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
This commit is contained in:
parent
2ef4f92b07
commit
a3dc295c5f
7 changed files with 23 additions and 2 deletions
|
@ -81,6 +81,11 @@ namespace Ryujinx.Input.GTK3
|
|||
return _pressedKeys.Contains(nativeKey);
|
||||
}
|
||||
|
||||
public void Clear()
|
||||
{
|
||||
_pressedKeys.Clear();
|
||||
}
|
||||
|
||||
public IGamepad GetGamepad(string id)
|
||||
{
|
||||
if (!_keyboardIdentifers[0].Equals(id))
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue