From 300f18db5806400a292a08409dff5b38158d81e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Tue, 24 Mar 2026 10:27:03 -0600 Subject: [PATCH] Add back the "Landscape auto" rotation type --- Core/Config.cpp | 4 +--- Core/ConfigValues.h | 2 +- UI/MiscViews.cpp | 5 +++-- UI/UIAtlas.cpp | 1 + assets/ui_images/images.svg | 42 ++++++++++++++++++++++++++++--------- 5 files changed, 38 insertions(+), 16 deletions(-) diff --git a/Core/Config.cpp b/Core/Config.cpp index 4380e8036b..a5cb02e5ee 100644 --- a/Core/Config.cpp +++ b/Core/Config.cpp @@ -1590,9 +1590,7 @@ void Config::PostLoadCleanup() { } // Squash unsupported screen rotations. - if (g_Config.iScreenRotation == ROTATION_AUTO_HORIZONTAL) { - g_Config.iScreenRotation = ROTATION_LOCKED_HORIZONTAL; - } else if (g_Config.iScreenRotation == ROTATION_LOCKED_VERTICAL180) { + if (g_Config.iScreenRotation == ROTATION_LOCKED_VERTICAL180) { g_Config.iScreenRotation = ROTATION_LOCKED_VERTICAL; } diff --git a/Core/ConfigValues.h b/Core/ConfigValues.h index 0adece1843..2bd3fb3566 100644 --- a/Core/ConfigValues.h +++ b/Core/ConfigValues.h @@ -93,7 +93,7 @@ enum { ROTATION_LOCKED_VERTICAL = 2, ROTATION_LOCKED_HORIZONTAL180 = 3, ROTATION_LOCKED_VERTICAL180 = 4, // Deprecated - ROTATION_AUTO_HORIZONTAL = 5, // Deprecated + ROTATION_AUTO_HORIZONTAL = 5, // Un-deprecated again }; enum TextureFiltering { diff --git a/UI/MiscViews.cpp b/UI/MiscViews.cpp index 34e2b17051..55b3ac1bf9 100644 --- a/UI/MiscViews.cpp +++ b/UI/MiscViews.cpp @@ -237,12 +237,13 @@ void GameImageView::Draw(UIContext &dc) { void AddRotationPicker(ScreenManager *screenManager, UI::ViewGroup *parent, bool text) { using namespace UI; - static const char *screenRotation[] = { "Auto", "Landscape", "Portrait", "Landscape Reversed" }; + static const char *screenRotation[] = { "Auto", "Landscape", "Portrait", "Landscape Reversed", "N/A", "Landscape Auto"}; static const std::map screenRotationIcons{ {ROTATION_AUTO, ImageID("I_DEVICE_ROTATION_AUTO")}, {ROTATION_LOCKED_HORIZONTAL, ImageID("I_DEVICE_ROTATION_LANDSCAPE")}, {ROTATION_LOCKED_VERTICAL, ImageID("I_DEVICE_ROTATION_PORTRAIT")}, {ROTATION_LOCKED_HORIZONTAL180, ImageID("I_DEVICE_ROTATION_LANDSCAPE_REV")}, + {ROTATION_AUTO_HORIZONTAL, ImageID("I_DEVICE_ROTATION_LANDSCAPE_AUT")}, }; auto co = GetI18NCategory(I18NCat::CONTROLS); @@ -256,7 +257,7 @@ void AddRotationPicker(ScreenManager *screenManager, UI::ViewGroup *parent, bool // Portrait Reversed is not recommended on iPhone (and we also ban it in the plist). // However it's recommended to support it on iPad, so maybe we will in the future. - rot->HideChoice(4); + rot->HideChoice(ROTATION_LOCKED_VERTICAL180); rot->OnChoice.Add([](UI::EventParams &) { INFO_LOG(Log::System, "New display rotation: %d", g_Config.iScreenRotation); System_Notify(SystemNotification::ROTATE_UPDATED); diff --git a/UI/UIAtlas.cpp b/UI/UIAtlas.cpp index 92b1d3a011..d172b3b89b 100644 --- a/UI/UIAtlas.cpp +++ b/UI/UIAtlas.cpp @@ -172,6 +172,7 @@ static const ImageMeta imageIDs[] = { {"I_DEVICE_ROTATION_AUTO", false}, {"I_DEVICE_ROTATION_LANDSCAPE", false}, {"I_DEVICE_ROTATION_PORTRAIT", false}, + {"I_DEVICE_ROTATION_LANDSCAPE_AUT", false}, {"I_MOVE", false}, {"I_RESIZE", false}, {"I_LINK_OUT_QUESTION", false}, diff --git a/assets/ui_images/images.svg b/assets/ui_images/images.svg index c969e3ff11..0792616ca0 100644 --- a/assets/ui_images/images.svg +++ b/assets/ui_images/images.svg @@ -7,7 +7,7 @@ viewBox="0 0 158.74998 185.20831" version="1.1" id="svg1" - inkscape:version="1.4.3 (0d15f75, 2025-12-25)" + inkscape:version="1.4.2 (f4327f4, 2025-05-13)" sodipodi:docname="images.svg" xml:space="preserve" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" @@ -24,15 +24,15 @@ inkscape:pagecheckerboard="true" inkscape:deskcolor="#d1d1d1" inkscape:document-units="px" - inkscape:zoom="11.313709" - inkscape:cx="261.54111" - inkscape:cy="619.73488" - inkscape:window-width="3840" - inkscape:window-height="2071" - inkscape:window-x="-9" - inkscape:window-y="-9" + inkscape:zoom="1.4142136" + inkscape:cx="309.71276" + inkscape:cy="526.44098" + inkscape:window-width="1920" + inkscape:window-height="1129" + inkscape:window-x="-8" + inkscape:window-y="-8" inkscape:window-maximized="1" - inkscape:current-layer="I_EDIT_TEXT" + inkscape:current-layer="layer1" showgrid="false" showguides="true" /> -