From 46ffc81d90bd3a8f2d24c2997166d22f12ecbbb6 Mon Sep 17 00:00:00 2001
From: ooa113y <13thSlayer@gmail.com>
Date: Thu, 5 Aug 2021 00:28:19 +0300
Subject: Hide UI rework/arrow key fix (#2504)

* Unbreak arrow keys

* Use bitshift for Flags instead of literal
---
 Ryujinx/Configuration/ConfigurationState.cs | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)

(limited to 'Ryujinx/Configuration/ConfigurationState.cs')

diff --git a/Ryujinx/Configuration/ConfigurationState.cs b/Ryujinx/Configuration/ConfigurationState.cs
index c98fbcca..41bd64a7 100644
--- a/Ryujinx/Configuration/ConfigurationState.cs
+++ b/Ryujinx/Configuration/ConfigurationState.cs
@@ -543,7 +543,8 @@ namespace Ryujinx.Configuration
             Hid.Hotkeys.Value = new KeyboardHotkeys
             {
                 ToggleVsync = Key.Tab,
-                Screenshot = Key.F8
+                Screenshot = Key.F8,
+                ShowUi = Key.F4
             };
             Hid.InputConfig.Value = new List<InputConfig>
             {
@@ -859,6 +860,20 @@ namespace Ryujinx.Configuration
                 configurationFileUpdated = true;
             }
 
+            if (configurationFileFormat.Version < 29)
+            {
+                Common.Logging.Logger.Warning?.Print(LogClass.Application, $"Outdated configuration version {configurationFileFormat.Version}, migrating to version 29.");
+
+                configurationFileFormat.Hotkeys = new KeyboardHotkeys
+                {
+                    ToggleVsync = Key.Tab,
+                    Screenshot = Key.F8,
+                    ShowUi = Key.F4
+                };
+
+                configurationFileUpdated = true;
+            }
+
             Logger.EnableFileLog.Value             = configurationFileFormat.EnableFileLog;
             Graphics.ResScale.Value                = configurationFileFormat.ResScale;
             Graphics.ResScaleCustom.Value          = configurationFileFormat.ResScaleCustom;
-- 
cgit v1.2.3-70-g09d2