Hide UI rework/arrow key fix (#2504)
* Unbreak arrow keys * Use bitshift for Flags instead of literal
This commit is contained in:
parent
5ceaf344ce
commit
46ffc81d90
7 changed files with 43 additions and 21 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue