Remember GUI column sort and separate hotkey settings from emulated input settings (#1223)

* Separate hotkey settings from emulated input settings

* Remember gui column sort

* nit

* fix schema

* nit

* Remove unused SaveDataPath to speed up game list loading

* Reset the vertical scrollbar to the top when titles finish loading
This commit is contained in:
Xpl0itR 2020-06-26 11:30:16 +01:00 committed by GitHub
parent 9a49f8aec9
commit 68a6960617
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 805 additions and 518 deletions

View file

@ -1,6 +1,7 @@
using System;
using OpenTK.Input;
using Ryujinx.Common.Configuration.Hid;
using Ryujinx.Configuration;
using Ryujinx.HLE.HOS.Services.Hid;
namespace Ryujinx.Ui
@ -91,20 +92,21 @@ namespace Ryujinx.Ui
return (dx, dy);
}
public HotkeyButtons GetHotkeyButtons()
public static HotkeyButtons GetHotkeyButtons(KeyboardState keyboard)
{
KeyboardState keyboard = GetKeyboardState(_config.Index);
HotkeyButtons buttons = 0;
if (keyboard[(Key)_config.Hotkeys.ToggleVsync]) buttons |= HotkeyButtons.ToggleVSync;
if (keyboard[(Key)ConfigurationState.Instance.Hid.Hotkeys.Value.ToggleVsync])
{
buttons |= HotkeyButtons.ToggleVSync;
}
return buttons;
}
class KeyMappingEntry
{
public Key TargetKey;
public Key TargetKey;
public byte Target;
}