about summary refs log tree commit diff stats
path: root/AnodyneArchipelago/Menu/TextEntry.cs
diff options
context:
space:
mode:
authorStar Rauchenberger <fefferburbia@gmail.com>2024-05-26 16:56:30 -0400
committerStar Rauchenberger <fefferburbia@gmail.com>2024-05-26 16:56:30 -0400
commit2c0101c46fdd686e85808224f6edca9bc6bab4a2 (patch)
tree3b634722f04a08ed6eca139115685a5dcd3e49cb /AnodyneArchipelago/Menu/TextEntry.cs
parent73db3c666e078db25c3af6e54f2db066523e4298 (diff)
downloadanodyne-archipelago-main.tar.gz
anodyne-archipelago-main.tar.bz2
anodyne-archipelago-main.zip
Use SDL for clipboard management HEAD main
Diffstat (limited to 'AnodyneArchipelago/Menu/TextEntry.cs')
-rw-r--r--AnodyneArchipelago/Menu/TextEntry.cs9
1 files changed, 1 insertions, 8 deletions
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;
4using AnodyneSharp.UI; 4using AnodyneSharp.UI;
5using Microsoft.Xna.Framework; 5using Microsoft.Xna.Framework;
6using Microsoft.Xna.Framework.Input; 6using Microsoft.Xna.Framework.Input;
7using System.Threading;
8 7
9namespace AnodyneArchipelago.Menu 8namespace AnodyneArchipelago.Menu
10{ 9{
@@ -49,13 +48,7 @@ namespace AnodyneArchipelago.Menu
49 } 48 }
50 else if (ch == 22) 49 else if (ch == 22)
51 { 50 {
52 string result = ""; 51 _value += SDL2.SDL.SDL_GetClipboardText();
53 Thread clipboardThread = new(() => result = System.Windows.Forms.Clipboard.GetText());
54 clipboardThread.SetApartmentState(ApartmentState.STA);
55 clipboardThread.Start();
56 clipboardThread.Join();
57
58 _value += result;
59 UpdateDisplay(); 52 UpdateDisplay();
60 } 53 }
61 else if (!char.IsControl(ch)) 54 else if (!char.IsControl(ch))