aboutsummaryrefslogtreecommitdiff
path: root/src/Ryujinx
diff options
context:
space:
mode:
authorTSRBerry <20988865+TSRBerry@users.noreply.github.com>2024-05-14 17:14:39 +0200
committerGitHub <noreply@github.com>2024-05-14 17:14:39 +0200
commita3dc295c5f867bddb56a38f3a848ceb61ff30d32 (patch)
tree7e8b472d377f2ff49ec31e1d4b01d59548271807 /src/Ryujinx
parent2ef4f92b0793feb7073ed85b7f7dc08dca6f14e9 (diff)
Disable keyboard controller input while swkbd is open (foreground) (#6646)
* Block input updates while swkbd is open in foreground mode * Flush internal driver state before unblocking input updates * Rename Flush to Clear and remove unnecessary attribute
Diffstat (limited to 'src/Ryujinx')
-rw-r--r--src/Ryujinx/Input/AvaloniaKeyboard.cs2
-rw-r--r--src/Ryujinx/Input/AvaloniaKeyboardDriver.cs2
-rw-r--r--src/Ryujinx/UI/Applet/AvaHostUIHandler.cs2
3 files changed, 4 insertions, 2 deletions
diff --git a/src/Ryujinx/Input/AvaloniaKeyboard.cs b/src/Ryujinx/Input/AvaloniaKeyboard.cs
index fbaaaaba..ff88de79 100644
--- a/src/Ryujinx/Input/AvaloniaKeyboard.cs
+++ b/src/Ryujinx/Input/AvaloniaKeyboard.cs
@@ -195,7 +195,7 @@ namespace Ryujinx.Ava.Input
public void Clear()
{
- _driver?.ResetKeys();
+ _driver?.Clear();
}
public void Dispose() { }
diff --git a/src/Ryujinx/Input/AvaloniaKeyboardDriver.cs b/src/Ryujinx/Input/AvaloniaKeyboardDriver.cs
index e9e71b99..9f87e821 100644
--- a/src/Ryujinx/Input/AvaloniaKeyboardDriver.cs
+++ b/src/Ryujinx/Input/AvaloniaKeyboardDriver.cs
@@ -94,7 +94,7 @@ namespace Ryujinx.Ava.Input
return _pressedKeys.Contains(nativeKey);
}
- public void ResetKeys()
+ public void Clear()
{
_pressedKeys.Clear();
}
diff --git a/src/Ryujinx/UI/Applet/AvaHostUIHandler.cs b/src/Ryujinx/UI/Applet/AvaHostUIHandler.cs
index 4bcc35a7..4bcf8eb9 100644
--- a/src/Ryujinx/UI/Applet/AvaHostUIHandler.cs
+++ b/src/Ryujinx/UI/Applet/AvaHostUIHandler.cs
@@ -122,6 +122,7 @@ namespace Ryujinx.Ava.UI.Applet
{
try
{
+ _parent.ViewModel.AppHost.NpadManager.BlockInputUpdates();
var response = await SwkbdAppletDialog.ShowInputDialog(LocaleManager.Instance[LocaleKeys.SoftwareKeyboard], args);
if (response.Result == UserResult.Ok)
@@ -143,6 +144,7 @@ namespace Ryujinx.Ava.UI.Applet
});
dialogCloseEvent.WaitOne();
+ _parent.ViewModel.AppHost.NpadManager.UnblockInputUpdates();
userText = error ? null : inputText;