From 36a0b7824d3c37beb8fd9ca5c6a9959cd1e56471 Mon Sep 17 00:00:00 2001 From: David Griswold Date: Thu, 31 Jul 2025 13:27:35 -0300 Subject: [PATCH] desktop: Fix horizontal centering single window mode (#1211) * fix horizontal centering single window mode * Formatting adjustment --------- Co-authored-by: OpenSauce04 --- src/core/frontend/framebuffer_layout.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/core/frontend/framebuffer_layout.cpp b/src/core/frontend/framebuffer_layout.cpp index 0e930900a..a347053fd 100644 --- a/src/core/frontend/framebuffer_layout.cpp +++ b/src/core/frontend/framebuffer_layout.cpp @@ -121,8 +121,10 @@ FramebufferLayout SingleFrameLayout(u32 width, u32 height, bool swapped, bool up width - Settings::values.screen_bottom_leftright_padding.GetValue(), height - Settings::values.screen_bottom_topbottom_padding.GetValue()}; } else { - top_screen = top_screen.TranslateY((height - top_screen.GetHeight()) / 2); - bot_screen = bot_screen.TranslateY((height - bot_screen.GetHeight()) / 2); + top_screen = top_screen.TranslateX((width - top_screen.GetWidth()) / 2) + .TranslateY((height - top_screen.GetHeight()) / 2); + bot_screen = bot_screen.TranslateX((width - bot_screen.GetWidth()) / 2) + .TranslateY((height - bot_screen.GetHeight()) / 2); } #endif