diff options
author | MutantAura <44103205+MutantAura@users.noreply.github.com> | 2022-07-24 19:44:47 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-24 15:44:47 -0300 |
commit | 62f8ceb60b969db65a24d312dde7c6513a07ec46 (patch) | |
tree | a52eaac963d4286f5cac0fabcd4d02b296d3c5fc /Ryujinx.Ui.Common/Configuration/ConfigurationState.cs | |
parent | 1a888ae0871c5ef590c92b992b87f01f05a19637 (diff) |
Resolution scaling hotkeys (#3185)1.1.191
* hotkeys
* comments
* update implementation to include custom scales
* copypasta
* review changes
* hotkeys
* comments
* update implementation to include custom scales
* copypasta
* review changes
* Remove outdated configuration and force hotkeys unbound
* Add avalonia support
* Fix configuration file
* Update GTK implementation and fix config... again.
* Remove legacy implementation + nits
* Avalonia locales (DeepL)
* review
* Remove colon from chinese locale
* Update ConfigFile
* locale fix
Diffstat (limited to 'Ryujinx.Ui.Common/Configuration/ConfigurationState.cs')
-rw-r--r-- | Ryujinx.Ui.Common/Configuration/ConfigurationState.cs | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/Ryujinx.Ui.Common/Configuration/ConfigurationState.cs b/Ryujinx.Ui.Common/Configuration/ConfigurationState.cs index c739b294..7f76dc3f 100644 --- a/Ryujinx.Ui.Common/Configuration/ConfigurationState.cs +++ b/Ryujinx.Ui.Common/Configuration/ConfigurationState.cs @@ -310,7 +310,7 @@ namespace Ryujinx.Ui.Common.Configuration EnableDockedMode = new ReactiveObject<bool>(); EnableDockedMode.Event += static (sender, e) => LogValueChange(sender, e, nameof(EnableDockedMode)); EnablePtc = new ReactiveObject<bool>(); - EnablePtc.Event += static (sender, e) => LogValueChange(sender, e, nameof(EnablePtc)); + EnablePtc.Event += static (sender, e) => LogValueChange(sender, e, nameof(EnablePtc)); EnableInternetAccess = new ReactiveObject<bool>(); EnableInternetAccess.Event += static (sender, e) => LogValueChange(sender, e, nameof(EnableInternetAccess)); EnableFsIntegrityChecks = new ReactiveObject<bool>(); @@ -648,7 +648,9 @@ namespace Ryujinx.Ui.Common.Configuration ToggleMute = Key.F2, Screenshot = Key.F8, ShowUi = Key.F4, - Pause = Key.F5 + Pause = Key.F5, + ResScaleUp = Key.Unbound, + ResScaleDown = Key.Unbound }; Hid.InputConfig.Value = new List<InputConfig> { @@ -967,7 +969,7 @@ namespace Ryujinx.Ui.Common.Configuration if (configurationFileFormat.Version < 29) { Ryujinx.Common.Logging.Logger.Warning?.Print(LogClass.Application, $"Outdated configuration version {configurationFileFormat.Version}, migrating to version 29."); - + configurationFileFormat.Hotkeys = new KeyboardHotkeys { ToggleVsync = Key.Tab, @@ -1096,6 +1098,22 @@ namespace Ryujinx.Ui.Common.Configuration configurationFileUpdated = true; } + if (configurationFileFormat.Version < 39) + { + Ryujinx.Common.Logging.Logger.Warning?.Print(LogClass.Application, $"Outdated configuration version {configurationFileFormat.Version}, migrating to version 39."); + + configurationFileFormat.Hotkeys = new KeyboardHotkeys + { + ToggleVsync = configurationFileFormat.Hotkeys.ToggleVsync, + Screenshot = configurationFileFormat.Hotkeys.Screenshot, + ShowUi = configurationFileFormat.Hotkeys.ShowUi, + Pause = configurationFileFormat.Hotkeys.Pause, + ToggleMute = configurationFileFormat.Hotkeys.ToggleMute, + ResScaleUp = Key.Unbound, + ResScaleDown = Key.Unbound + }; + } + Logger.EnableFileLog.Value = configurationFileFormat.EnableFileLog; Graphics.ResScale.Value = configurationFileFormat.ResScale; Graphics.ResScaleCustom.Value = configurationFileFormat.ResScaleCustom; |