From c5eecc320c2d108f0ea469c51a2f269b2383d5db Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 2 Jun 2024 23:01:54 -0300 Subject: [PATCH] Update ToggleTurbo hotkey to refactored Input --- src/Ryujinx/UI/Models/Input/HotkeyConfig.cs | 13 +++++++++++++ .../UI/Views/Settings/SettingsHotkeysView.axaml | 2 +- .../UI/Views/Settings/SettingsHotkeysView.axaml.cs | 3 +++ 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/src/Ryujinx/UI/Models/Input/HotkeyConfig.cs b/src/Ryujinx/UI/Models/Input/HotkeyConfig.cs index b5f53508bd..02fd84b836 100644 --- a/src/Ryujinx/UI/Models/Input/HotkeyConfig.cs +++ b/src/Ryujinx/UI/Models/Input/HotkeyConfig.cs @@ -104,6 +104,17 @@ namespace Ryujinx.Ava.UI.Models.Input } } + private Key _toggleTurbo; + public Key ToggleTurbo + { + get => _toggleTurbo; + set + { + _toggleTurbo = value; + OnPropertyChanged(); + } + } + public HotkeyConfig(KeyboardHotkeys config) { if (config != null) @@ -117,6 +128,7 @@ namespace Ryujinx.Ava.UI.Models.Input ResScaleDown = config.ResScaleDown; VolumeUp = config.VolumeUp; VolumeDown = config.VolumeDown; + ToggleTurbo = config.ToggleTurbo; } } @@ -133,6 +145,7 @@ namespace Ryujinx.Ava.UI.Models.Input ResScaleDown = ResScaleDown, VolumeUp = VolumeUp, VolumeDown = VolumeDown, + ToggleTurbo = ToggleTurbo, }; return config; diff --git a/src/Ryujinx/UI/Views/Settings/SettingsHotkeysView.axaml b/src/Ryujinx/UI/Views/Settings/SettingsHotkeysView.axaml index 62a69f9e6c..4a1c75b473 100644 --- a/src/Ryujinx/UI/Views/Settings/SettingsHotkeysView.axaml +++ b/src/Ryujinx/UI/Views/Settings/SettingsHotkeysView.axaml @@ -105,7 +105,7 @@ - + diff --git a/src/Ryujinx/UI/Views/Settings/SettingsHotkeysView.axaml.cs b/src/Ryujinx/UI/Views/Settings/SettingsHotkeysView.axaml.cs index fb0fe2bb12..0974f0eeea 100644 --- a/src/Ryujinx/UI/Views/Settings/SettingsHotkeysView.axaml.cs +++ b/src/Ryujinx/UI/Views/Settings/SettingsHotkeysView.axaml.cs @@ -109,6 +109,9 @@ namespace Ryujinx.Ava.UI.Views.Settings case "VolumeDown": viewModel.KeyboardHotkey.VolumeDown = buttonValue.AsHidType(); break; + case "ToggleTurbo": + viewModel.KeyboardHotkey.ToggleTurbo = buttonValue.AsHidType(); + break; } } };