From 183862d9741c60cacc4abaf5b7adf32b65ba41ae Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Sun, 17 Dec 2023 21:45:42 +0100 Subject: [PATCH] Added theme engine support for the 1:1 display aspect ratio --- es-core/src/ThemeData.cpp | 6 ++++-- es-core/src/renderers/Renderer.cpp | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/es-core/src/ThemeData.cpp b/es-core/src/ThemeData.cpp index 52a1f99af..45d248cc1 100644 --- a/es-core/src/ThemeData.cpp +++ b/es-core/src/ThemeData.cpp @@ -66,7 +66,8 @@ std::vector> ThemeData::sSupportedAspectRati {"21:9", "21:9"}, {"21:9_vertical", "21:9 vertical"}, {"32:9", "32:0"}, - {"32:9_vertical", "32:9 vertical"}}; + {"32:9_vertical", "32:9 vertical"}, + {"1:1", "1:1"}}; std::map ThemeData::sAspectRatioMap { {"16:9", 1.7777f}, @@ -82,7 +83,8 @@ std::map ThemeData::sAspectRatioMap { {"21:9", 2.3703f}, {"21:9_vertical", 0.4219f}, {"32:9", 3.5555f}, - {"32:9_vertical", 0.2813f}}; + {"32:9_vertical", 0.2813f}, + {"1:1", 1.0f}}; std::map> ThemeData::sPropertyAttributeMap // The data type is defined by the parent property. diff --git a/es-core/src/renderers/Renderer.cpp b/es-core/src/renderers/Renderer.cpp index 712ef54fa..85c285b9c 100644 --- a/es-core/src/renderers/Renderer.cpp +++ b/es-core/src/renderers/Renderer.cpp @@ -163,7 +163,7 @@ bool Renderer::createWindow() sScreenHeight = tempVal; } - if (sScreenHeight > sScreenWidth) + if (sScreenHeight >= sScreenWidth) sIsVerticalOrientation = true; else sIsVerticalOrientation = false;