From 391ec44d97021d9358bd9db5cd12c41c5b674b7c Mon Sep 17 00:00:00 2001 From: DirtBagXon Date: Fri, 24 May 2024 00:23:44 +0100 Subject: [PATCH] SDL_GetDisplayBounds --- Src/OSD/SDL/Main.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Src/OSD/SDL/Main.cpp b/Src/OSD/SDL/Main.cpp index fdf787d..c706d90 100644 --- a/Src/OSD/SDL/Main.cpp +++ b/Src/OSD/SDL/Main.cpp @@ -962,12 +962,19 @@ int Supermodel(const Game &game, ROMSet *rom_set, IEmulator *Model3, CInputs *In char titleStr[128]; totalXRes = xRes = s_runtime_config["XResolution"].ValueAs(); totalYRes = yRes = s_runtime_config["YResolution"].ValueAs(); + bool fullscreen = s_runtime_config["FullScreen"].ValueAs(); + if (fullscreen) { + SDL_Rect g_logical_rect = {0, 0, 0, 0}; + SDL_GetDisplayBounds(0, &g_logical_rect); + totalXRes = g_logical_rect.w; + totalYRes = g_logical_rect.h; + } sprintf(baseTitleStr, "Supermodel - %s", game.title.c_str()); SDL_SetWindowTitle(s_window, baseTitleStr); SDL_SetWindowSize(s_window, totalXRes, totalYRes); SDL_SetWindowPosition(s_window, SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED); bool stretch = s_runtime_config["Stretch"].ValueAs(); - bool fullscreen = s_runtime_config["FullScreen"].ValueAs(); + if (OKAY != ResizeGLScreen(&xOffset, &yOffset ,&xRes, &yRes, &totalXRes, &totalYRes, !stretch, fullscreen)) return 1;