Block input updates while swkbd is open in foreground mode

This commit is contained in:
TSR Berry 2024-04-11 17:21:04 +02:00
parent 2ddd3dd4a7
commit 2edd862433
No known key found for this signature in database
GPG key ID: 52353C0A4CCA15E2
2 changed files with 5 additions and 0 deletions

View file

@ -107,6 +107,8 @@ namespace Ryujinx.UI.Applet
swkbdDialog.SetInputLengthValidation(args.StringLengthMin, args.StringLengthMax);
swkbdDialog.SetInputValidation(args.KeyboardMode);
((MainWindow)_parent).RendererWidget.NpadManager.BlockInputUpdates();
if (swkbdDialog.Run() == (int)ResponseType.Ok)
{
inputText = swkbdDialog.InputEntry.Text;
@ -128,6 +130,7 @@ namespace Ryujinx.UI.Applet
});
dialogCloseEvent.WaitOne();
((MainWindow)_parent).RendererWidget.NpadManager.UnblockInputUpdates();
userText = error ? null : inputText;

View file

@ -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;