From fb108abab7fae407987854d932245a5f715ae626 Mon Sep 17 00:00:00 2001 From: DaMarkov Date: Thu, 10 Feb 2022 22:14:38 +0100 Subject: [PATCH] Fixed an issue when the user is resizing the window while in 4:3 mode. --- src/native/Native.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/native/Native.cpp b/src/native/Native.cpp index 4412f1d4..3ee314dd 100644 --- a/src/native/Native.cpp +++ b/src/native/Native.cpp @@ -97,11 +97,16 @@ extern "C" void gfx_resize(long width, long height) { g_originalWidth = width; - g_width = width; + + if (config.frameBufferEmulation.aspect == 1)//Running in 4:3 mode? + g_width = (height*4)/3; + else + g_width = width; g_height = height; - config.video.windowedWidth = g_width; - config.video.windowedHeight = g_height; - dwnd().setWindowSize(g_width, g_height); + + config.video.windowedWidth = width; + config.video.windowedHeight = height; + dwnd().setWindowSize(width, height); } }