From 2c0101c46fdd686e85808224f6edca9bc6bab4a2 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Sun, 26 May 2024 16:56:30 -0400 Subject: Use SDL for clipboard management --- AnodyneArchipelago/Menu/TextEntry.cs | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'AnodyneArchipelago/Menu') diff --git a/AnodyneArchipelago/Menu/TextEntry.cs b/AnodyneArchipelago/Menu/TextEntry.cs index 2bcdf1b..e13331a 100644 --- a/AnodyneArchipelago/Menu/TextEntry.cs +++ b/AnodyneArchipelago/Menu/TextEntry.cs @@ -4,7 +4,6 @@ using AnodyneSharp.States; using AnodyneSharp.UI; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Input; -using System.Threading; namespace AnodyneArchipelago.Menu { @@ -49,13 +48,7 @@ namespace AnodyneArchipelago.Menu } else if (ch == 22) { - string result = ""; - Thread clipboardThread = new(() => result = System.Windows.Forms.Clipboard.GetText()); - clipboardThread.SetApartmentState(ApartmentState.STA); - clipboardThread.Start(); - clipboardThread.Join(); - - _value += result; + _value += SDL2.SDL.SDL_GetClipboardText(); UpdateDisplay(); } else if (!char.IsControl(ch)) -- cgit 1.4.1