mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-07-25 15:19:50 -06:00
Hide UI rework/arrow key fix (#2504)
* Unbreak arrow keys * Use bitshift for Flags instead of literal
This commit is contained in:
@ -568,6 +568,12 @@ namespace Ryujinx.Ui
|
||||
Renderer.Screenshot();
|
||||
}
|
||||
|
||||
if (currentHotkeyState.HasFlag(KeyboardHotkeyState.ShowUi) &&
|
||||
!_prevHotkeyState.HasFlag(KeyboardHotkeyState.ShowUi))
|
||||
{
|
||||
(Toplevel as MainWindow).ToggleExtraWidgets(true);
|
||||
}
|
||||
|
||||
_prevHotkeyState = currentHotkeyState;
|
||||
}
|
||||
|
||||
@ -593,9 +599,10 @@ namespace Ryujinx.Ui
|
||||
[Flags]
|
||||
private enum KeyboardHotkeyState
|
||||
{
|
||||
None,
|
||||
ToggleVSync,
|
||||
Screenshot
|
||||
None = 0,
|
||||
ToggleVSync = 1 << 0,
|
||||
Screenshot = 1 << 1,
|
||||
ShowUi = 1 << 2
|
||||
}
|
||||
|
||||
private KeyboardHotkeyState GetHotkeyState()
|
||||
@ -612,6 +619,11 @@ namespace Ryujinx.Ui
|
||||
state |= KeyboardHotkeyState.Screenshot;
|
||||
}
|
||||
|
||||
if (_keyboardInterface.IsPressed((Key)ConfigurationState.Instance.Hid.Hotkeys.Value.ShowUi))
|
||||
{
|
||||
state |= KeyboardHotkeyState.ShowUi;
|
||||
}
|
||||
|
||||
return state;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user