Toggle VSync Hotkey (#659)
* Added toggle vsync button and hotkeys section to config * Uses hasflag instead of bitwise comparison * fixed schema name Co-Authored-By: BaronKiko <BaronKiko@users.noreply.github.com>
This commit is contained in:
parent
74da8785a5
commit
50d6ec9efe
5 changed files with 66 additions and 6 deletions
|
@ -35,6 +35,11 @@ namespace Ryujinx.UI.Input
|
|||
public Key ButtonZr;
|
||||
}
|
||||
|
||||
public struct KeyboardHotkeys
|
||||
{
|
||||
public Key ToggleVsync;
|
||||
}
|
||||
|
||||
public class NpadKeyboard
|
||||
{
|
||||
/// <summary>
|
||||
|
@ -47,6 +52,11 @@ namespace Ryujinx.UI.Input
|
|||
/// </summary>
|
||||
public NpadKeyboardRight RightJoycon { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Hotkey Keyboard Bindings
|
||||
/// </summary>
|
||||
public KeyboardHotkeys Hotkeys { get; private set; }
|
||||
|
||||
public HidControllerButtons GetButtons(KeyboardState keyboard)
|
||||
{
|
||||
HidControllerButtons buttons = 0;
|
||||
|
@ -97,5 +107,14 @@ namespace Ryujinx.UI.Input
|
|||
|
||||
return (dx, dy);
|
||||
}
|
||||
|
||||
public HidHotkeyButtons GetHotkeyButtons(KeyboardState keyboard)
|
||||
{
|
||||
HidHotkeyButtons buttons = 0;
|
||||
|
||||
if (keyboard[(Key)Hotkeys.ToggleVsync]) buttons |= HidHotkeyButtons.ToggleVSync;
|
||||
|
||||
return buttons;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue