From 1351f37c98affb7db1d470798e0ee1767e307ae3 Mon Sep 17 00:00:00 2001 From: Gitez Date: Tue, 20 Oct 2026 18:35:00 +0200 Subject: [PATCH 1/6] Added aspect ratio selector --- runtime/include/runtime_config.h | 16 ++++++++++++++++ runtime/src/hle/sc.cpp | 2 +- runtime/src/settings_overlay.cpp | 13 +++++++++++++ 3 files changed, 30 insertions(+), 1 deletion(-) diff --git a/runtime/include/runtime_config.h b/runtime/include/runtime_config.h index 99d6c2bf2..c92bd3015 100644 --- a/runtime/include/runtime_config.h +++ b/runtime/include/runtime_config.h @@ -33,6 +33,7 @@ struct RuntimeUserConfig { std::optional widescreen; + std::optional advertisedAspectRatio; std::optional forceAspect169; std::optional windowPosX; std::optional windowPosY; @@ -279,6 +280,7 @@ inline void EnsureConfigFile() { "# Set paths.dvd_root to an extracted Mario Kart Wii DATA directory.\n\n" "[video]\n" "widescreen = true\n" + "advertised_aspect_ratio = \"16:9\"\n" "force_16_9 = false\n" "resolution_multiplier = 1.0\n" "frame_interpolation_fps = 0\n" @@ -437,6 +439,7 @@ inline RuntimeUserConfig ParseConfigDocument(const toml::value& document) { } config.widescreen = FindConfigValue(document, "video", "widescreen"); + config.advertisedAspectRatio = FindConfigValue(document, "video", "advertised_aspect_ratio"); config.forceAspect169 = FindConfigValue(document, "video", "force_16_9"); config.windowPosX = FindConfigInt(document, "video", "window_x"); config.windowPosY = FindConfigInt(document, "video", "window_y"); @@ -781,6 +784,19 @@ inline bool WidescreenEnabled(bool fallback = false) { return Get().widescreen.value_or(fallback); } +inline bool AdvertisedAspectRatio169(bool fallback = false) { + if (Get().advertisedAspectRatio) { + return *Get().advertisedAspectRatio != "4:3"; + } + return WidescreenEnabled(fallback); +} + +inline bool SetAdvertisedAspectRatio169(bool value) { + Mutable().advertisedAspectRatio = value ? "16:9" : "4:3"; + return WriteSetting("video", "advertised_aspect_ratio", + FormatString(*Mutable().advertisedAspectRatio)); +} + inline bool ForceAspect169Enabled(bool fallback = false) { return Get().forceAspect169.value_or(fallback); } diff --git a/runtime/src/hle/sc.cpp b/runtime/src/hle/sc.cpp index bb33e01fb..e6a4be50f 100644 --- a/runtime/src/hle/sc.cpp +++ b/runtime/src/hle/sc.cpp @@ -53,7 +53,7 @@ PPC_NATIVE_OVERRIDE(801B0220, SCCheckStatus_HLE, uint32_t, (), ()); // Returns: 0 = 4:3, 1 = 16:9 extern "C" uint32_t SCGetAspectRatio_HLE() { - return (RuntimeConfigFile::WidescreenEnabled(true) || MkwForceAspect169Requested()) ? 1u : 0u; + return RuntimeConfigFile::AdvertisedAspectRatio169(true) ? 1u : 0u; } PPC_NATIVE_OVERRIDE(801B1BE4, SCGetAspectRatio_HLE, uint32_t, (), ()); diff --git a/runtime/src/settings_overlay.cpp b/runtime/src/settings_overlay.cpp index 4836c6e35..0f789a397 100644 --- a/runtime/src/settings_overlay.cpp +++ b/runtime/src/settings_overlay.cpp @@ -111,6 +111,7 @@ bool g_skipUnreadyPipelines = RuntimeConfigFile::SkipUnreadyPipelines(true); bool g_disableCopyFilter = RuntimeConfigFile::DisableCopyFilter(true); bool g_showFps = RuntimeConfigFile::ShowFps(true); bool g_forceAspect169 = RuntimeConfigFile::ForceAspect169Enabled(); +bool g_advertisedAspect169 = RuntimeConfigFile::AdvertisedAspectRatio169(true); #if defined(__APPLE__) bool g_metalFxSpatialUpscaling = RuntimeConfigFile::MetalFxSpatialUpscaling(false); #endif @@ -1041,6 +1042,18 @@ void DrawAudioSettings() { void DrawGraphicsSettings() { g_displayMode = static_cast(aurora_get_display_mode()); + const char* advertisedAspectLabel = g_advertisedAspect169 ? "16:9" : "4:3"; + if (ImGui::BeginCombo("Advertised aspect ratio", advertisedAspectLabel)) { + if (ImGui::Selectable("16:9", g_advertisedAspect169)) { + g_advertisedAspect169 = true; + RuntimeConfigFile::SetAdvertisedAspectRatio169(true); + } + if (ImGui::Selectable("4:3", !g_advertisedAspect169)) { + g_advertisedAspect169 = false; + RuntimeConfigFile::SetAdvertisedAspectRatio169(false); + } + ImGui::EndCombo(); + } if (ImGui::Checkbox("Force 16:9", &g_forceAspect169)) { SetMkwForceAspect169(g_forceAspect169); RuntimeConfigFile::SetForceAspect169(g_forceAspect169); From d18ec9bf693bd56ed0d09197f5c92f2edd5fffb7 Mon Sep 17 00:00:00 2001 From: Gitez Date: Tue, 20 Oct 2026 18:47:19 +0200 Subject: [PATCH 2/6] Dirty 4:3 fix --- runtime/include/aurora_events.h | 1 + runtime/src/dynamic_aspect.cpp | 12 +++++++++++- runtime/src/main.cpp | 12 +++++++----- runtime/src/settings_overlay.cpp | 2 ++ 4 files changed, 21 insertions(+), 6 deletions(-) diff --git a/runtime/include/aurora_events.h b/runtime/include/aurora_events.h index e10c151aa..71bd2d208 100644 --- a/runtime/include/aurora_events.h +++ b/runtime/include/aurora_events.h @@ -18,6 +18,7 @@ extern "C" bool g_dynamicAspectRatioEnabled; void ConfigureMkwDynamicAspect(bool widescreen, bool forceAspect169, uint32_t surfaceWidth, uint32_t surfaceHeight); void SetMkwForceAspect169(bool enabled); +void SetMkwAdvertisedAspect169(bool enabled); bool MkwForceAspect169Requested(); void UpdateMkwDynamicAspectSurface(uint32_t surfaceWidth, uint32_t surfaceHeight); // Arms the "keep EGG::Frustum's projection scale" flag on every screen that diff --git a/runtime/src/dynamic_aspect.cpp b/runtime/src/dynamic_aspect.cpp index 693f8a779..25a63b216 100644 --- a/runtime/src/dynamic_aspect.cpp +++ b/runtime/src/dynamic_aspect.cpp @@ -18,6 +18,7 @@ bool g_widescreenConfigured = false; bool g_widescreenSetting = false; bool g_forceAspect169 = false; std::atomic_bool g_requestedForceAspect169{false}; +std::atomic_bool g_requestedAdvertisedAspect169{true}; bool g_policyDirty = false; uint32_t g_lastEggWidth43 = 0; uint32_t g_lastEggWidth169 = 0; @@ -173,8 +174,12 @@ void AssertMkwOffscreenScreenBypass() { void UpdateMkwDynamicAspectSurface(uint32_t surfaceWidth, uint32_t surfaceHeight) { const bool requestedForceAspect169 = g_requestedForceAspect169.load(std::memory_order_acquire); - if (g_forceAspect169 != requestedForceAspect169) { + const bool requestedAdvertisedAspect169 = + g_requestedAdvertisedAspect169.load(std::memory_order_acquire); + if (g_forceAspect169 != requestedForceAspect169 || + g_widescreenSetting != requestedAdvertisedAspect169) { g_forceAspect169 = requestedForceAspect169; + g_widescreenSetting = requestedAdvertisedAspect169; g_widescreenConfigured = g_widescreenSetting || g_forceAspect169; g_dynamicAspectRatioEnabled = g_widescreenConfigured; g_policyDirty = true; @@ -204,6 +209,10 @@ void SetMkwForceAspect169(bool enabled) { g_requestedForceAspect169.store(enabled, std::memory_order_release); } +void SetMkwAdvertisedAspect169(bool enabled) { + g_requestedAdvertisedAspect169.store(enabled, std::memory_order_release); +} + bool MkwForceAspect169Requested() { return g_requestedForceAspect169.load(std::memory_order_acquire); } @@ -213,6 +222,7 @@ void ConfigureMkwDynamicAspect(bool widescreen, bool forceAspect169, uint32_t su g_widescreenConfigured = widescreen || forceAspect169; g_forceAspect169 = forceAspect169; g_requestedForceAspect169.store(forceAspect169, std::memory_order_relaxed); + g_requestedAdvertisedAspect169.store(widescreen, std::memory_order_relaxed); g_dynamicAspectRatioEnabled = g_widescreenConfigured; g_lastEggWidth43 = 0; g_lastEggWidth169 = 0; diff --git a/runtime/src/main.cpp b/runtime/src/main.cpp index 5f37a5478..b3578d9a7 100644 --- a/runtime/src/main.cpp +++ b/runtime/src/main.cpp @@ -1368,6 +1368,7 @@ int RuntimeMain(int argc, char** argv) { auroraConfig.logCallback = &RuntimeAuroraLogCallback; auroraConfig.logLevel = LOG_DEBUG; const bool configWidescreen = RuntimeConfigFile::WidescreenEnabled(true); + const bool advertisedAspect169 = RuntimeConfigFile::AdvertisedAspectRatio169(configWidescreen); const bool forceAspect169 = RuntimeConfigFile::ForceAspect169Enabled(); auroraConfig.windowWidth = (configWidescreen || forceAspect169) ? 854 : 640; auroraConfig.windowHeight = 480; @@ -1387,7 +1388,7 @@ int RuntimeMain(int argc, char** argv) { // No vsync knob: aurora always configures a non-blocking present mode. auroraConfig.desiredBackend = BACKEND_AUTO; const float resolutionMultiplier = RuntimeConfigFile::ResolutionMultiplier(1.0f); - ConfigureMkwDynamicAspect(configWidescreen, forceAspect169, + ConfigureMkwDynamicAspect(advertisedAspect169, forceAspect169, auroraConfig.windowWidth, auroraConfig.windowHeight); VISetFrameBufferScale(resolutionMultiplier); // One table for both directions. RuntimeConfigFile::IsSupportedGraphicsApi @@ -1454,16 +1455,17 @@ int RuntimeMain(int argc, char** argv) { UpdateMkwDynamicAspectSurface(auroraInfo.windowSize.native_fb_width, auroraInfo.windowSize.native_fb_height); settings_overlay::InitializeRuntimeSettings(); - RT_LOG(RT_TAG_CONFIG) << "video.widescreen=" << (configWidescreen ? "true" : "false") + RT_LOG(RT_TAG_CONFIG) << "video.advertised_aspect_ratio=" + << (advertisedAspect169 ? "16:9" : "4:3") << " force_16_9=" << (forceAspect169 ? "true" : "false") - << " SCGetAspectRatio=" << (configWidescreen || forceAspect169 ? 1 : 0) + << " SCGetAspectRatio=" << (advertisedAspect169 ? 1 : 0) << " resolutionMultiplier=" << resolutionMultiplier << " window=" << auroraInfo.windowSize.width << "x" << auroraInfo.windowSize.height << " native=" << auroraInfo.windowSize.native_fb_width << "x" << auroraInfo.windowSize.native_fb_height - << " viewportPolicy=" << (forceAspect169 ? "16:9" : (configWidescreen ? "stretch" : "fit")) + << " viewportPolicy=" << (forceAspect169 ? "16:9" : (advertisedAspect169 ? "stretch" : "fit")) << " presentAspect=" - << (forceAspect169 ? "16:9" : (configWidescreen ? "surface (dynamic EGG canvas)" : "4:3")) + << (forceAspect169 ? "16:9" : (advertisedAspect169 ? "surface (dynamic EGG canvas)" : "4:3")) << std::endl; g_auroraInitialized.store(true, std::memory_order_release); diff --git a/runtime/src/settings_overlay.cpp b/runtime/src/settings_overlay.cpp index 0f789a397..3a229ec4b 100644 --- a/runtime/src/settings_overlay.cpp +++ b/runtime/src/settings_overlay.cpp @@ -1046,10 +1046,12 @@ void DrawGraphicsSettings() { if (ImGui::BeginCombo("Advertised aspect ratio", advertisedAspectLabel)) { if (ImGui::Selectable("16:9", g_advertisedAspect169)) { g_advertisedAspect169 = true; + SetMkwAdvertisedAspect169(true); RuntimeConfigFile::SetAdvertisedAspectRatio169(true); } if (ImGui::Selectable("4:3", !g_advertisedAspect169)) { g_advertisedAspect169 = false; + SetMkwAdvertisedAspect169(false); RuntimeConfigFile::SetAdvertisedAspectRatio169(false); } ImGui::EndCombo(); From 024cd80a937f64daeacdc3de13a0112f0ed478b3 Mon Sep 17 00:00:00 2001 From: Gitez Date: Tue, 20 Oct 2026 19:27:05 +0200 Subject: [PATCH 3/6] Fixed dynamic aspect in 4:3 --- runtime/include/aurora_events.h | 1 - runtime/src/dynamic_aspect.cpp | 20 +++++++++----------- runtime/src/hle/gx/gx_dynamic_aspect.h | 25 +++++++++++++++++++++++++ runtime/src/main.cpp | 4 ++-- runtime/src/settings_overlay.cpp | 2 -- 5 files changed, 36 insertions(+), 16 deletions(-) diff --git a/runtime/include/aurora_events.h b/runtime/include/aurora_events.h index 71bd2d208..e10c151aa 100644 --- a/runtime/include/aurora_events.h +++ b/runtime/include/aurora_events.h @@ -18,7 +18,6 @@ extern "C" bool g_dynamicAspectRatioEnabled; void ConfigureMkwDynamicAspect(bool widescreen, bool forceAspect169, uint32_t surfaceWidth, uint32_t surfaceHeight); void SetMkwForceAspect169(bool enabled); -void SetMkwAdvertisedAspect169(bool enabled); bool MkwForceAspect169Requested(); void UpdateMkwDynamicAspectSurface(uint32_t surfaceWidth, uint32_t surfaceHeight); // Arms the "keep EGG::Frustum's projection scale" flag on every screen that diff --git a/runtime/src/dynamic_aspect.cpp b/runtime/src/dynamic_aspect.cpp index 25a63b216..12f2f0641 100644 --- a/runtime/src/dynamic_aspect.cpp +++ b/runtime/src/dynamic_aspect.cpp @@ -5,6 +5,7 @@ #include #include "aurora_events.h" #include "hle/gx/gx_dynamic_aspect.h" +#include "runtime_config.h" #include @@ -18,7 +19,6 @@ bool g_widescreenConfigured = false; bool g_widescreenSetting = false; bool g_forceAspect169 = false; std::atomic_bool g_requestedForceAspect169{false}; -std::atomic_bool g_requestedAdvertisedAspect169{true}; bool g_policyDirty = false; uint32_t g_lastEggWidth43 = 0; uint32_t g_lastEggWidth169 = 0; @@ -131,8 +131,11 @@ void WriteEggScreenRecord(uint32_t recordAddr, uint32_t width) { void ApplyEggScreenRecords(uint32_t surfaceWidth, uint32_t surfaceHeight) { using namespace MkwDynamicAspect; + const bool advertisedAspect169 = RuntimeConfigFile::AdvertisedAspectRatio169(true); + const float referenceAspect = advertisedAspect169 ? kPresentationAspect169 : 4.0f / 3.0f; const uint32_t width43 = - g_widescreenConfigured ? EggRecordWidth(kEggRecordWidth43, surfaceWidth, surfaceHeight) + g_widescreenConfigured ? EggRecordWidth(kEggRecordWidth43, surfaceWidth, surfaceHeight, + referenceAspect) : kEggRecordWidth43; const uint32_t width169 = g_widescreenConfigured ? EggRecordWidth(kEggRecordWidth169, surfaceWidth, surfaceHeight) @@ -142,7 +145,7 @@ void ApplyEggScreenRecords(uint32_t surfaceWidth, uint32_t surfaceHeight) { Memory::WriteFloat32(kEggScreenProjScaleX, 1.0f); Memory::WriteFloat32(kEggScreenProjScaleY, g_widescreenConfigured - ? VerticalExpansion(surfaceWidth, surfaceHeight) + ? VerticalExpansion(surfaceWidth, surfaceHeight, referenceAspect) : 1.0f); AssertOffscreenScreenBypass(); if (width43 == g_lastEggWidth43 && width169 == g_lastEggWidth169) { @@ -175,12 +178,12 @@ void AssertMkwOffscreenScreenBypass() { void UpdateMkwDynamicAspectSurface(uint32_t surfaceWidth, uint32_t surfaceHeight) { const bool requestedForceAspect169 = g_requestedForceAspect169.load(std::memory_order_acquire); const bool requestedAdvertisedAspect169 = - g_requestedAdvertisedAspect169.load(std::memory_order_acquire); + RuntimeConfigFile::AdvertisedAspectRatio169(g_widescreenSetting); if (g_forceAspect169 != requestedForceAspect169 || g_widescreenSetting != requestedAdvertisedAspect169) { g_forceAspect169 = requestedForceAspect169; g_widescreenSetting = requestedAdvertisedAspect169; - g_widescreenConfigured = g_widescreenSetting || g_forceAspect169; + g_widescreenConfigured = true; g_dynamicAspectRatioEnabled = g_widescreenConfigured; g_policyDirty = true; } @@ -209,20 +212,15 @@ void SetMkwForceAspect169(bool enabled) { g_requestedForceAspect169.store(enabled, std::memory_order_release); } -void SetMkwAdvertisedAspect169(bool enabled) { - g_requestedAdvertisedAspect169.store(enabled, std::memory_order_release); -} - bool MkwForceAspect169Requested() { return g_requestedForceAspect169.load(std::memory_order_acquire); } void ConfigureMkwDynamicAspect(bool widescreen, bool forceAspect169, uint32_t surfaceWidth, uint32_t surfaceHeight) { g_widescreenSetting = widescreen; - g_widescreenConfigured = widescreen || forceAspect169; + g_widescreenConfigured = true; g_forceAspect169 = forceAspect169; g_requestedForceAspect169.store(forceAspect169, std::memory_order_relaxed); - g_requestedAdvertisedAspect169.store(widescreen, std::memory_order_relaxed); g_dynamicAspectRatioEnabled = g_widescreenConfigured; g_lastEggWidth43 = 0; g_lastEggWidth169 = 0; diff --git a/runtime/src/hle/gx/gx_dynamic_aspect.h b/runtime/src/hle/gx/gx_dynamic_aspect.h index 7d64eea44..ef64cbeee 100644 --- a/runtime/src/hle/gx/gx_dynamic_aspect.h +++ b/runtime/src/hle/gx/gx_dynamic_aspect.h @@ -37,6 +37,11 @@ inline float AspectRatioFactor(uint32_t width, uint32_t height) noexcept { return SurfaceAspect(width, height) / kPresentationAspect169; } +inline float AspectRatioFactor(uint32_t width, uint32_t height, + float referenceAspect) noexcept { + return SurfaceAspect(width, height) / referenceAspect; +} + // Hor+ factor, clamped at 1 so a tighter-than-16:9 surface never narrows the // canvas (that would crop away scene the 16:9 view showed). inline float HorizontalExpansion(uint32_t width, uint32_t height) noexcept { @@ -53,6 +58,15 @@ inline float VerticalExpansion(uint32_t width, uint32_t height) noexcept { return std::clamp(1.0f / factor, 1.0f, kMaxVerticalExpansion); } +inline float VerticalExpansion(uint32_t width, uint32_t height, + float referenceAspect) noexcept { + const float factor = AspectRatioFactor(width, height, referenceAspect); + if (!(factor > 0.0f)) { + return 1.0f; + } + return std::clamp(1.0f / factor, 1.0f, kMaxVerticalExpansion); +} + inline uint32_t EggRecordWidth(uint32_t baseWidth, uint32_t surfaceWidth, uint32_t surfaceHeight) noexcept { const float scaledWidth = @@ -61,6 +75,17 @@ inline uint32_t EggRecordWidth(uint32_t baseWidth, uint32_t surfaceWidth, static_cast(std::lround(scaledWidth / 4.0f)) * 4u, 4u, 0xFFFCu); } +inline uint32_t EggRecordWidth(uint32_t baseWidth, uint32_t surfaceWidth, + uint32_t surfaceHeight, + float referenceAspect) noexcept { + const float scaledWidth = static_cast(baseWidth) * + std::max(1.0f, AspectRatioFactor(surfaceWidth, + surfaceHeight, + referenceAspect)); + return std::clamp( + static_cast(std::lround(scaledWidth / 4.0f)) * 4u, 4u, 0xFFFCu); +} + inline float EggHorizontalScale(uint32_t recordWidth) noexcept { return kEggFramebufferWidth / static_cast(std::max(recordWidth, 1u)); } diff --git a/runtime/src/main.cpp b/runtime/src/main.cpp index b3578d9a7..a8f3a542e 100644 --- a/runtime/src/main.cpp +++ b/runtime/src/main.cpp @@ -1463,9 +1463,9 @@ int RuntimeMain(int argc, char** argv) { << " window=" << auroraInfo.windowSize.width << "x" << auroraInfo.windowSize.height << " native=" << auroraInfo.windowSize.native_fb_width << "x" << auroraInfo.windowSize.native_fb_height - << " viewportPolicy=" << (forceAspect169 ? "16:9" : (advertisedAspect169 ? "stretch" : "fit")) + << " viewportPolicy=" << (forceAspect169 ? "16:9" : (configWidescreen ? "stretch" : "fit")) << " presentAspect=" - << (forceAspect169 ? "16:9" : (advertisedAspect169 ? "surface (dynamic EGG canvas)" : "4:3")) + << (forceAspect169 ? "16:9" : (configWidescreen ? "surface (dynamic EGG canvas)" : "4:3")) << std::endl; g_auroraInitialized.store(true, std::memory_order_release); diff --git a/runtime/src/settings_overlay.cpp b/runtime/src/settings_overlay.cpp index 3a229ec4b..0f789a397 100644 --- a/runtime/src/settings_overlay.cpp +++ b/runtime/src/settings_overlay.cpp @@ -1046,12 +1046,10 @@ void DrawGraphicsSettings() { if (ImGui::BeginCombo("Advertised aspect ratio", advertisedAspectLabel)) { if (ImGui::Selectable("16:9", g_advertisedAspect169)) { g_advertisedAspect169 = true; - SetMkwAdvertisedAspect169(true); RuntimeConfigFile::SetAdvertisedAspectRatio169(true); } if (ImGui::Selectable("4:3", !g_advertisedAspect169)) { g_advertisedAspect169 = false; - SetMkwAdvertisedAspect169(false); RuntimeConfigFile::SetAdvertisedAspectRatio169(false); } ImGui::EndCombo(); From 410867dc551ace0e3b0e547a6d7ce95818866939 Mon Sep 17 00:00:00 2001 From: Gitez Date: Fri, 23 Oct 2026 17:57:38 +0200 Subject: [PATCH 4/6] Cleaned up aspect ratio --- runtime/include/aurora_events.h | 2 -- runtime/include/runtime_config.h | 5 +---- runtime/src/dynamic_aspect.cpp | 33 ++++---------------------------- runtime/src/settings_overlay.cpp | 3 +-- 4 files changed, 6 insertions(+), 37 deletions(-) diff --git a/runtime/include/aurora_events.h b/runtime/include/aurora_events.h index e10c151aa..a33b2e89d 100644 --- a/runtime/include/aurora_events.h +++ b/runtime/include/aurora_events.h @@ -17,8 +17,6 @@ extern "C" bool g_dynamicAspectRatioEnabled; void ConfigureMkwDynamicAspect(bool widescreen, bool forceAspect169, uint32_t surfaceWidth, uint32_t surfaceHeight); -void SetMkwForceAspect169(bool enabled); -bool MkwForceAspect169Requested(); void UpdateMkwDynamicAspectSurface(uint32_t surfaceWidth, uint32_t surfaceHeight); // Arms the "keep EGG::Frustum's projection scale" flag on every screen that // renders to a fixed-size offscreen target. Cheap and idempotent; called from diff --git a/runtime/include/runtime_config.h b/runtime/include/runtime_config.h index c92bd3015..2b26b052d 100644 --- a/runtime/include/runtime_config.h +++ b/runtime/include/runtime_config.h @@ -792,9 +792,7 @@ inline bool AdvertisedAspectRatio169(bool fallback = false) { } inline bool SetAdvertisedAspectRatio169(bool value) { - Mutable().advertisedAspectRatio = value ? "16:9" : "4:3"; - return WriteSetting("video", "advertised_aspect_ratio", - FormatString(*Mutable().advertisedAspectRatio)); + return WriteSetting("video", "advertised_aspect_ratio", value ? "\"16:9\"" : "\"4:3\""); } inline bool ForceAspect169Enabled(bool fallback = false) { @@ -802,7 +800,6 @@ inline bool ForceAspect169Enabled(bool fallback = false) { } inline bool SetForceAspect169(bool value) { - Mutable().forceAspect169 = value; return WriteSetting("video", "force_16_9", value ? "true" : "false"); } diff --git a/runtime/src/dynamic_aspect.cpp b/runtime/src/dynamic_aspect.cpp index 12f2f0641..0efb60fe0 100644 --- a/runtime/src/dynamic_aspect.cpp +++ b/runtime/src/dynamic_aspect.cpp @@ -2,10 +2,8 @@ #include "memory.h" #include -#include #include "aurora_events.h" #include "hle/gx/gx_dynamic_aspect.h" -#include "runtime_config.h" #include @@ -16,9 +14,8 @@ extern "C" int g_gxFrameCount; namespace { bool g_widescreenConfigured = false; -bool g_widescreenSetting = false; bool g_forceAspect169 = false; -std::atomic_bool g_requestedForceAspect169{false}; +float g_referenceAspect = MkwDynamicAspect::kPresentationAspect169; bool g_policyDirty = false; uint32_t g_lastEggWidth43 = 0; uint32_t g_lastEggWidth169 = 0; @@ -131,11 +128,9 @@ void WriteEggScreenRecord(uint32_t recordAddr, uint32_t width) { void ApplyEggScreenRecords(uint32_t surfaceWidth, uint32_t surfaceHeight) { using namespace MkwDynamicAspect; - const bool advertisedAspect169 = RuntimeConfigFile::AdvertisedAspectRatio169(true); - const float referenceAspect = advertisedAspect169 ? kPresentationAspect169 : 4.0f / 3.0f; const uint32_t width43 = g_widescreenConfigured ? EggRecordWidth(kEggRecordWidth43, surfaceWidth, surfaceHeight, - referenceAspect) + g_referenceAspect) : kEggRecordWidth43; const uint32_t width169 = g_widescreenConfigured ? EggRecordWidth(kEggRecordWidth169, surfaceWidth, surfaceHeight) @@ -145,7 +140,7 @@ void ApplyEggScreenRecords(uint32_t surfaceWidth, uint32_t surfaceHeight) { Memory::WriteFloat32(kEggScreenProjScaleX, 1.0f); Memory::WriteFloat32(kEggScreenProjScaleY, g_widescreenConfigured - ? VerticalExpansion(surfaceWidth, surfaceHeight, referenceAspect) + ? VerticalExpansion(surfaceWidth, surfaceHeight, g_referenceAspect) : 1.0f); AssertOffscreenScreenBypass(); if (width43 == g_lastEggWidth43 && width169 == g_lastEggWidth169) { @@ -176,17 +171,6 @@ void AssertMkwOffscreenScreenBypass() { } void UpdateMkwDynamicAspectSurface(uint32_t surfaceWidth, uint32_t surfaceHeight) { - const bool requestedForceAspect169 = g_requestedForceAspect169.load(std::memory_order_acquire); - const bool requestedAdvertisedAspect169 = - RuntimeConfigFile::AdvertisedAspectRatio169(g_widescreenSetting); - if (g_forceAspect169 != requestedForceAspect169 || - g_widescreenSetting != requestedAdvertisedAspect169) { - g_forceAspect169 = requestedForceAspect169; - g_widescreenSetting = requestedAdvertisedAspect169; - g_widescreenConfigured = true; - g_dynamicAspectRatioEnabled = g_widescreenConfigured; - g_policyDirty = true; - } if (surfaceWidth == 0 || surfaceHeight == 0) { return; } @@ -208,19 +192,10 @@ void UpdateMkwDynamicAspectSurface(uint32_t surfaceWidth, uint32_t surfaceHeight g_forceAspect169 ? 9u : surfaceHeight); } -void SetMkwForceAspect169(bool enabled) { - g_requestedForceAspect169.store(enabled, std::memory_order_release); -} - -bool MkwForceAspect169Requested() { - return g_requestedForceAspect169.load(std::memory_order_acquire); -} - void ConfigureMkwDynamicAspect(bool widescreen, bool forceAspect169, uint32_t surfaceWidth, uint32_t surfaceHeight) { - g_widescreenSetting = widescreen; g_widescreenConfigured = true; g_forceAspect169 = forceAspect169; - g_requestedForceAspect169.store(forceAspect169, std::memory_order_relaxed); + g_referenceAspect = widescreen ? MkwDynamicAspect::kPresentationAspect169 : 4.0f / 3.0f; g_dynamicAspectRatioEnabled = g_widescreenConfigured; g_lastEggWidth43 = 0; g_lastEggWidth169 = 0; diff --git a/runtime/src/settings_overlay.cpp b/runtime/src/settings_overlay.cpp index 0f789a397..cfe8ff341 100644 --- a/runtime/src/settings_overlay.cpp +++ b/runtime/src/settings_overlay.cpp @@ -1043,7 +1043,7 @@ void DrawAudioSettings() { void DrawGraphicsSettings() { g_displayMode = static_cast(aurora_get_display_mode()); const char* advertisedAspectLabel = g_advertisedAspect169 ? "16:9" : "4:3"; - if (ImGui::BeginCombo("Advertised aspect ratio", advertisedAspectLabel)) { + if (ImGui::BeginCombo("Advertised aspect ratio (restart required)", advertisedAspectLabel)) { if (ImGui::Selectable("16:9", g_advertisedAspect169)) { g_advertisedAspect169 = true; RuntimeConfigFile::SetAdvertisedAspectRatio169(true); @@ -1055,7 +1055,6 @@ void DrawGraphicsSettings() { ImGui::EndCombo(); } if (ImGui::Checkbox("Force 16:9", &g_forceAspect169)) { - SetMkwForceAspect169(g_forceAspect169); RuntimeConfigFile::SetForceAspect169(g_forceAspect169); } ImGui::TextDisabled("Keep a 16:9 image with black bars when the window has another shape."); From 2896b4da55bccec434a18563aabfeba6ba964022 Mon Sep 17 00:00:00 2001 From: Gitez Date: Fri, 23 Oct 2026 18:06:41 +0200 Subject: [PATCH 5/6] Fixed force aspect ratio --- runtime/include/aurora_events.h | 1 + runtime/src/dynamic_aspect.cpp | 35 +++++++++++++++++++++++++------- runtime/src/settings_overlay.cpp | 5 +++-- 3 files changed, 32 insertions(+), 9 deletions(-) diff --git a/runtime/include/aurora_events.h b/runtime/include/aurora_events.h index a33b2e89d..309af3ae5 100644 --- a/runtime/include/aurora_events.h +++ b/runtime/include/aurora_events.h @@ -17,6 +17,7 @@ extern "C" bool g_dynamicAspectRatioEnabled; void ConfigureMkwDynamicAspect(bool widescreen, bool forceAspect169, uint32_t surfaceWidth, uint32_t surfaceHeight); +void SetMkwForceAspect(bool enabled); void UpdateMkwDynamicAspectSurface(uint32_t surfaceWidth, uint32_t surfaceHeight); // Arms the "keep EGG::Frustum's projection scale" flag on every screen that // renders to a fixed-size offscreen target. Cheap and idempotent; called from diff --git a/runtime/src/dynamic_aspect.cpp b/runtime/src/dynamic_aspect.cpp index 0efb60fe0..4fa8ec11c 100644 --- a/runtime/src/dynamic_aspect.cpp +++ b/runtime/src/dynamic_aspect.cpp @@ -15,6 +15,7 @@ namespace { bool g_widescreenConfigured = false; bool g_forceAspect169 = false; +bool g_referenceAspect169 = true; float g_referenceAspect = MkwDynamicAspect::kPresentationAspect169; bool g_policyDirty = false; uint32_t g_lastEggWidth43 = 0; @@ -184,25 +185,45 @@ void UpdateMkwDynamicAspectSurface(uint32_t surfaceWidth, uint32_t surfaceHeight return; } if (g_policyDirty) { - VIUnlockAspectRatio(); + if (g_forceAspect169 && !g_referenceAspect169) { + AuroraSetViewportPolicy(AURORA_VIEWPORT_FIT); + VILockAspectRatio(4, 3); + } else { + AuroraSetViewportPolicy(g_forceAspect169 ? AURORA_VIEWPORT_16_9 : AURORA_VIEWPORT_STRETCH); + VIUnlockAspectRatio(); + } g_policyDirty = false; } - AuroraSetViewportPolicy(g_forceAspect169 ? AURORA_VIEWPORT_16_9 : AURORA_VIEWPORT_STRETCH); - ApplyEggScreenRecords(g_forceAspect169 ? 16u : surfaceWidth, - g_forceAspect169 ? 9u : surfaceHeight); + if (!g_forceAspect169) { + AuroraSetViewportPolicy(AURORA_VIEWPORT_STRETCH); + ApplyEggScreenRecords(surfaceWidth, surfaceHeight); + return; + } + ApplyEggScreenRecords(g_referenceAspect169 ? 16u : 4u, + g_referenceAspect169 ? 9u : 3u); +} + +void SetMkwForceAspect(bool enabled) { + g_forceAspect169 = enabled; + g_policyDirty = true; + uint32_t surfaceWidth = 0; + uint32_t surfaceHeight = 0; + AuroraGetSurfaceSize(&surfaceWidth, &surfaceHeight); + UpdateMkwDynamicAspectSurface(surfaceWidth, surfaceHeight); } void ConfigureMkwDynamicAspect(bool widescreen, bool forceAspect169, uint32_t surfaceWidth, uint32_t surfaceHeight) { g_widescreenConfigured = true; g_forceAspect169 = forceAspect169; + g_referenceAspect169 = widescreen; g_referenceAspect = widescreen ? MkwDynamicAspect::kPresentationAspect169 : 4.0f / 3.0f; + g_policyDirty = true; g_dynamicAspectRatioEnabled = g_widescreenConfigured; g_lastEggWidth43 = 0; g_lastEggWidth169 = 0; if (g_widescreenConfigured) { - VIUnlockAspectRatio(); - ApplyEggScreenRecords(forceAspect169 ? 16u : surfaceWidth, - forceAspect169 ? 9u : surfaceHeight); + ApplyEggScreenRecords(forceAspect169 ? (widescreen ? 16u : 4u) : surfaceWidth, + forceAspect169 ? (widescreen ? 9u : 3u) : surfaceHeight); return; } diff --git a/runtime/src/settings_overlay.cpp b/runtime/src/settings_overlay.cpp index cfe8ff341..e1a522140 100644 --- a/runtime/src/settings_overlay.cpp +++ b/runtime/src/settings_overlay.cpp @@ -1054,10 +1054,11 @@ void DrawGraphicsSettings() { } ImGui::EndCombo(); } - if (ImGui::Checkbox("Force 16:9", &g_forceAspect169)) { + if (ImGui::Checkbox("Force aspect ratio", &g_forceAspect169)) { + SetMkwForceAspect(g_forceAspect169); RuntimeConfigFile::SetForceAspect169(g_forceAspect169); } - ImGui::TextDisabled("Keep a 16:9 image with black bars when the window has another shape."); + ImGui::TextDisabled("Keep the current aspect ratio with black bars when the window has another shape."); ImGui::Separator(); struct EffectFlag { const char* label; From d31531ab4437265c1c2fab700a620dea6d3589ef Mon Sep 17 00:00:00 2001 From: Gitez Date: Fri, 23 Oct 2026 18:40:20 +0200 Subject: [PATCH 6/6] More clean up --- runtime/include/aurora_events.h | 2 +- runtime/include/runtime_config.h | 14 ++++---- runtime/src/dynamic_aspect.cpp | 57 ++++++++++---------------------- runtime/src/main.cpp | 13 ++++---- runtime/src/settings_overlay.cpp | 8 ++--- 5 files changed, 36 insertions(+), 58 deletions(-) diff --git a/runtime/include/aurora_events.h b/runtime/include/aurora_events.h index 53d125cb4..62a20f167 100644 --- a/runtime/include/aurora_events.h +++ b/runtime/include/aurora_events.h @@ -18,7 +18,7 @@ #endif extern "C" bool g_dynamicAspectRatioEnabled; -void ConfigureMkwDynamicAspect(bool widescreen, bool forceAspect169, uint32_t surfaceWidth, uint32_t surfaceHeight); +void ConfigureMkwDynamicAspect(bool widescreen, bool forceAspect, uint32_t surfaceWidth, uint32_t surfaceHeight); void SetMkwForceAspect(bool enabled); void UpdateMkwDynamicAspectSurface(uint32_t surfaceWidth, uint32_t surfaceHeight); // Arms the "keep EGG::Frustum's projection scale" flag on every screen that diff --git a/runtime/include/runtime_config.h b/runtime/include/runtime_config.h index 3f9798eae..bb76fad86 100644 --- a/runtime/include/runtime_config.h +++ b/runtime/include/runtime_config.h @@ -34,7 +34,7 @@ struct RuntimeUserConfig { std::optional widescreen; std::optional advertisedAspectRatio; - std::optional forceAspect169; + std::optional forceAspect; std::optional windowPosX; std::optional windowPosY; std::optional windowWidth; @@ -273,7 +273,7 @@ inline void EnsureConfigFile() { "[video]\n" "widescreen = true\n" "advertised_aspect_ratio = \"16:9\"\n" - "force_16_9 = false\n" + "force_aspect = false\n" "resolution_multiplier = 1.0\n" "frame_interpolation_fps = 0\n" "display_mode = \"windowed\"\n" @@ -406,7 +406,7 @@ inline RuntimeUserConfig ParseConfigDocument(const toml::value& document) { config.widescreen = FindConfigValue(document, "video", "widescreen"); config.advertisedAspectRatio = FindConfigValue(document, "video", "advertised_aspect_ratio"); - config.forceAspect169 = FindConfigValue(document, "video", "force_16_9"); + config.forceAspect = FindConfigValue(document, "video", "force_aspect"); config.windowPosX = FindConfigInt(document, "video", "window_x"); config.windowPosY = FindConfigInt(document, "video", "window_y"); if (auto value = FindConfigUint(document, "video", "window_width"); value && *value != 0) { @@ -774,12 +774,12 @@ inline bool SetAdvertisedAspectRatio169(bool value) { return WriteSetting("video", "advertised_aspect_ratio", value ? "\"16:9\"" : "\"4:3\""); } -inline bool ForceAspect169Enabled(bool fallback = false) { - return Get().forceAspect169.value_or(fallback); +inline bool ForceAspectEnabled(bool fallback = false) { + return Get().forceAspect.value_or(fallback); } -inline bool SetForceAspect169(bool value) { - return WriteSetting("video", "force_16_9", value ? "true" : "false"); +inline bool SetForceAspect(bool value) { + return WriteSetting("video", "force_aspect", value ? "true" : "false"); } inline bool WindowPosition(int32_t& x, int32_t& y) { diff --git a/runtime/src/dynamic_aspect.cpp b/runtime/src/dynamic_aspect.cpp index 9774c3913..2ba5b1f6e 100644 --- a/runtime/src/dynamic_aspect.cpp +++ b/runtime/src/dynamic_aspect.cpp @@ -13,9 +13,8 @@ extern "C" int g_gxFrameCount; namespace { -bool g_widescreenConfigured = false; -bool g_forceAspect169 = false; -bool g_referenceAspect169 = true; +bool g_forceAspect = false; +bool g_referenceWidescreen = true; float g_referenceAspect = MkwDynamicAspect::kPresentationAspect169; bool g_policyDirty = false; uint32_t g_lastEggWidth43 = 0; @@ -130,19 +129,14 @@ void WriteEggScreenRecord(uint32_t recordAddr, uint32_t width) { void ApplyEggScreenRecords(uint32_t surfaceWidth, uint32_t surfaceHeight) { using namespace MkwDynamicAspect; const uint32_t width43 = - g_widescreenConfigured ? EggRecordWidth(kEggRecordWidth43, surfaceWidth, surfaceHeight, - g_referenceAspect) - : kEggRecordWidth43; + EggRecordWidth(kEggRecordWidth43, surfaceWidth, surfaceHeight, g_referenceAspect); const uint32_t width169 = - g_widescreenConfigured ? EggRecordWidth(kEggRecordWidth169, surfaceWidth, surfaceHeight) - : kEggRecordWidth169; + EggRecordWidth(kEggRecordWidth169, surfaceWidth, surfaceHeight); WriteEggScreenRecord(kEggScreenRecord43, width43); WriteEggScreenRecord(kEggScreenRecord169, width169); Memory::WriteFloat32(kEggScreenProjScaleX, 1.0f); Memory::WriteFloat32(kEggScreenProjScaleY, - g_widescreenConfigured - ? VerticalExpansion(surfaceWidth, surfaceHeight, g_referenceAspect) - : 1.0f); + VerticalExpansion(surfaceWidth, surfaceHeight, g_referenceAspect)); AssertOffscreenScreenBypass(); if (width43 == g_lastEggWidth43 && width169 == g_lastEggWidth169) { return; @@ -175,36 +169,27 @@ void UpdateMkwDynamicAspectSurface(uint32_t surfaceWidth, uint32_t surfaceHeight if (surfaceWidth == 0 || surfaceHeight == 0) { return; } - if (!g_widescreenConfigured) { - if (g_policyDirty) { - AuroraSetViewportPolicy(AURORA_VIEWPORT_FIT); - VILockAspectRatio(4, 3); - ApplyEggScreenRecords(surfaceWidth, surfaceHeight); - g_policyDirty = false; - } - return; - } if (g_policyDirty) { - if (g_forceAspect169 && !g_referenceAspect169) { + if (g_forceAspect && !g_referenceWidescreen) { AuroraSetViewportPolicy(AURORA_VIEWPORT_FIT); VILockAspectRatio(4, 3); } else { - AuroraSetViewportPolicy(g_forceAspect169 ? AURORA_VIEWPORT_16_9 : AURORA_VIEWPORT_STRETCH); + AuroraSetViewportPolicy(g_forceAspect ? AURORA_VIEWPORT_16_9 : AURORA_VIEWPORT_STRETCH); VIUnlockAspectRatio(); } g_policyDirty = false; } - if (!g_forceAspect169) { + if (!g_forceAspect) { AuroraSetViewportPolicy(AURORA_VIEWPORT_STRETCH); ApplyEggScreenRecords(surfaceWidth, surfaceHeight); return; } - ApplyEggScreenRecords(g_referenceAspect169 ? 16u : 4u, - g_referenceAspect169 ? 9u : 3u); + ApplyEggScreenRecords(g_referenceWidescreen ? 16u : 4u, + g_referenceWidescreen ? 9u : 3u); } void SetMkwForceAspect(bool enabled) { - g_forceAspect169 = enabled; + g_forceAspect = enabled; g_policyDirty = true; uint32_t surfaceWidth = 0; uint32_t surfaceHeight = 0; @@ -212,22 +197,14 @@ void SetMkwForceAspect(bool enabled) { UpdateMkwDynamicAspectSurface(surfaceWidth, surfaceHeight); } -void ConfigureMkwDynamicAspect(bool widescreen, bool forceAspect169, uint32_t surfaceWidth, uint32_t surfaceHeight) { - g_widescreenConfigured = true; - g_forceAspect169 = forceAspect169; - g_referenceAspect169 = widescreen; +void ConfigureMkwDynamicAspect(bool widescreen, bool forceAspect, uint32_t surfaceWidth, uint32_t surfaceHeight) { + g_forceAspect = forceAspect; + g_referenceWidescreen = widescreen; g_referenceAspect = widescreen ? MkwDynamicAspect::kPresentationAspect169 : 4.0f / 3.0f; g_policyDirty = true; - g_dynamicAspectRatioEnabled = g_widescreenConfigured; + g_dynamicAspectRatioEnabled = true; g_lastEggWidth43 = 0; g_lastEggWidth169 = 0; - if (g_widescreenConfigured) { - ApplyEggScreenRecords(forceAspect169 ? (widescreen ? 16u : 4u) : surfaceWidth, - forceAspect169 ? (widescreen ? 9u : 3u) : surfaceHeight); - return; - } - - AuroraSetViewportPolicy(AURORA_VIEWPORT_FIT); - VILockAspectRatio(4, 3); - ApplyEggScreenRecords(surfaceWidth, surfaceHeight); + ApplyEggScreenRecords(forceAspect ? (widescreen ? 16u : 4u) : surfaceWidth, + forceAspect ? (widescreen ? 9u : 3u) : surfaceHeight); } diff --git a/runtime/src/main.cpp b/runtime/src/main.cpp index 30d7d83f3..8815c0d6e 100644 --- a/runtime/src/main.cpp +++ b/runtime/src/main.cpp @@ -1375,8 +1375,8 @@ int RuntimeMain(int argc, char** argv) { auroraConfig.logLevel = LOG_DEBUG; const bool configWidescreen = RuntimeConfigFile::WidescreenEnabled(true); const bool advertisedAspect169 = RuntimeConfigFile::AdvertisedAspectRatio169(configWidescreen); - const bool forceAspect169 = RuntimeConfigFile::ForceAspect169Enabled(); - auroraConfig.windowWidth = (configWidescreen || forceAspect169) ? 854 : 640; + const bool forceAspect = RuntimeConfigFile::ForceAspectEnabled(); + auroraConfig.windowWidth = (advertisedAspect169 || forceAspect) ? 854 : 640; auroraConfig.windowHeight = 480; auroraConfig.windowWidth = RuntimeConfigFile::WindowWidth(auroraConfig.windowWidth); auroraConfig.windowHeight = RuntimeConfigFile::WindowHeight(auroraConfig.windowHeight); @@ -1394,7 +1394,7 @@ int RuntimeMain(int argc, char** argv) { auroraConfig.vsync = RuntimeConfigFile::Vsync(); auroraConfig.desiredBackend = BACKEND_AUTO; const float resolutionMultiplier = RuntimeConfigFile::ResolutionMultiplier(1.0f); - ConfigureMkwDynamicAspect(advertisedAspect169, forceAspect169, + ConfigureMkwDynamicAspect(advertisedAspect169, forceAspect, auroraConfig.windowWidth, auroraConfig.windowHeight); VISetFrameBufferScale(resolutionMultiplier); // One table for both directions. RuntimeConfigFile::IsSupportedGraphicsApi @@ -1463,15 +1463,16 @@ int RuntimeMain(int argc, char** argv) { settings_overlay::InitializeRuntimeSettings(); RT_LOG(RT_TAG_CONFIG) << "video.advertised_aspect_ratio=" << (advertisedAspect169 ? "16:9" : "4:3") - << " force_16_9=" << (forceAspect169 ? "true" : "false") + << " force_aspect=" << (forceAspect ? "true" : "false") << " SCGetAspectRatio=" << (advertisedAspect169 ? 1 : 0) << " resolutionMultiplier=" << resolutionMultiplier << " window=" << auroraInfo.windowSize.width << "x" << auroraInfo.windowSize.height << " native=" << auroraInfo.windowSize.native_fb_width << "x" << auroraInfo.windowSize.native_fb_height - << " viewportPolicy=" << (forceAspect169 ? "16:9" : (configWidescreen ? "stretch" : "fit")) + << " viewportPolicy=" << (forceAspect ? "fixed" : (advertisedAspect169 ? "stretch" : "fit")) << " presentAspect=" - << (forceAspect169 ? "16:9" : (configWidescreen ? "surface (dynamic EGG canvas)" : "4:3")) + << (forceAspect ? (advertisedAspect169 ? "16:9" : "4:3") + : (advertisedAspect169 ? "surface (dynamic EGG canvas)" : "4:3")) << std::endl; g_auroraInitialized.store(true, std::memory_order_release); GxWorker::SetWaitCallback(ServiceGuestTimingDuringAuroraFrameWait); diff --git a/runtime/src/settings_overlay.cpp b/runtime/src/settings_overlay.cpp index 6bae83cfc..0ddae55ea 100644 --- a/runtime/src/settings_overlay.cpp +++ b/runtime/src/settings_overlay.cpp @@ -112,7 +112,7 @@ bool g_skipUnreadyPipelines = RuntimeConfigFile::SkipUnreadyPipelines(true); bool g_vsync = RuntimeConfigFile::Vsync(); bool g_disableCopyFilter = RuntimeConfigFile::DisableCopyFilter(true); bool g_showFps = RuntimeConfigFile::ShowFps(true); -bool g_forceAspect169 = RuntimeConfigFile::ForceAspect169Enabled(); +bool g_forceAspect = RuntimeConfigFile::ForceAspectEnabled(); bool g_advertisedAspect169 = RuntimeConfigFile::AdvertisedAspectRatio169(true); #if defined(__APPLE__) bool g_metalFxSpatialUpscaling = RuntimeConfigFile::MetalFxSpatialUpscaling(false); @@ -1082,9 +1082,9 @@ void DrawGraphicsSettings() { } ImGui::EndCombo(); } - if (ImGui::Checkbox("Force aspect ratio", &g_forceAspect169)) { - SetMkwForceAspect(g_forceAspect169); - RuntimeConfigFile::SetForceAspect169(g_forceAspect169); + if (ImGui::Checkbox("Force aspect ratio", &g_forceAspect)) { + SetMkwForceAspect(g_forceAspect); + RuntimeConfigFile::SetForceAspect(g_forceAspect); } ImGui::TextDisabled("Keep the current aspect ratio with black bars when the window has another shape."); ImGui::Separator();