desktop: Fix horizontal centering single window mode (#1211)

* fix horizontal centering single window mode

* Formatting adjustment

---------

Co-authored-by: OpenSauce04 <opensauce04@gmail.com>
This commit is contained in:
David Griswold 2025-07-31 13:27:35 -03:00 committed by GitHub
parent 3b0542f188
commit 36a0b7824d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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