diff --git a/MOD.Scripts.Core/MODWindowManager.cs b/MOD.Scripts.Core/MODWindowManager.cs index 46106a6e..e8b55453 100644 --- a/MOD.Scripts.Core/MODWindowManager.cs +++ b/MOD.Scripts.Core/MODWindowManager.cs @@ -322,6 +322,11 @@ public static void ForceUnconfigureFullscreenLock() { PlayerPrefs.DeleteKey(FULLSCREEN_LOCK_KEY); } + public static void ClearPlayerPrefsFullscreenResolution() + { + PlayerPrefs.DeleteKey("fullscreen_width"); + PlayerPrefs.DeleteKey("fullscreen_height"); + } private static Resolution GetFullscreenResolution() { diff --git a/MOD.Scripts.UI/MODMenuResolution.cs b/MOD.Scripts.UI/MODMenuResolution.cs index 05817fe6..cc7e4a05 100644 --- a/MOD.Scripts.UI/MODMenuResolution.cs +++ b/MOD.Scripts.UI/MODMenuResolution.cs @@ -24,7 +24,7 @@ public void OnBeforeMenuVisible() public void OnGUI() { - Label("Resolution Settings"); + Label($"Resolution Settings (Current: {Screen.width}x{Screen.height})"); { GUILayout.BeginHorizontal(); if (Button(new GUIContent("480p", "Set resolution to 853 x 480"))) { SetAndSaveResolution(480); } @@ -51,6 +51,16 @@ public void OnGUI() } } GUILayout.EndHorizontal(); + + if (Button(new GUIContent( + "Reset Fullscreen Resolution", + "Force re-detection of the fullscreen resolution (matching your monitor's max resolution).\n\n" + + "You may want to do this if you change to a monitor with a different fullscreen resolution, and the game detects the wrong resolution.") + )) + { + MODWindowManager.ClearPlayerPrefsFullscreenResolution(); + MODWindowManager.GoFullscreen(); + } } }