From 7c9c28f0265da4eba1ae1b9d4be6b4d0a1768dab Mon Sep 17 00:00:00 2001 From: Alug Date: Wed, 6 Mar 2024 09:27:06 +0100 Subject: [PATCH] Revert "use desktop resolution for stuff" This reverts commit a54384a579ed6d2a11f073987388321c8a2ec345. --- src/sdl/i_video.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/src/sdl/i_video.c b/src/sdl/i_video.c index 2c9b2f0fa..5f49e62b2 100644 --- a/src/sdl/i_video.c +++ b/src/sdl/i_video.c @@ -162,8 +162,6 @@ static SDL_bool videoblitok = SDL_FALSE; static SDL_bool exposevideo = SDL_FALSE; static SDL_bool usesdl2soft = SDL_FALSE; static SDL_bool borderlesswindow = SDL_FALSE; -static SDL_DisplayMode currentDisplayMode; -static SDL_DisplayMode currentWindowMode; // SDL2 vars SDL_Window *window; @@ -229,7 +227,6 @@ static void SDLSetMode(INT32 width, INT32 height, SDL_bool fullscreen) Uint32 amask; int bpp = 16; int sw_texture_format = SDL_PIXELFORMAT_ABGR8888; - int index = SDL_GetWindowDisplayIndex(window); realwidth = vid.width; realheight = vid.height; @@ -244,8 +241,7 @@ static void SDLSetMode(INT32 width, INT32 height, SDL_bool fullscreen) else if (fullscreen && cv_fullscreen.value == 2) { wasfullscreen = SDL_TRUE; - SDL_GetDesktopDisplayMode(index, ¤tWindowMode); - SDL_SetWindowSize(window, currentWindowMode.w, currentWindowMode.h); + SDL_SetWindowSize(window, realwidth, realheight); SDL_SetWindowFullscreen(window, SDL_WINDOW_FULLSCREEN); } else // windowed mode @@ -279,8 +275,7 @@ static void SDLSetMode(INT32 width, INT32 height, SDL_bool fullscreen) else if (fullscreen && cv_fullscreen.value == 2) { wasfullscreen = SDL_TRUE; - SDL_GetDesktopDisplayMode(index, ¤tWindowMode); - SDL_SetWindowSize(window, currentWindowMode.w, currentWindowMode.h); + SDL_SetWindowSize(window, realwidth, realheight); SDL_SetWindowFullscreen(window, SDL_WINDOW_FULLSCREEN); } } @@ -1997,11 +1992,8 @@ static SDL_bool Impl_CreateWindow(SDL_bool fullscreen) // Create a window if (cv_fullscreen.value == 2) - { - SDL_GetDesktopDisplayMode(0, ¤tDisplayMode); window = SDL_CreateWindow("SRB2Kart "VERSIONSTRING, SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, - currentDisplayMode.w, currentDisplayMode.h, flags); - } + vid.width, vid.height, flags); else window = SDL_CreateWindow("SRB2Kart "VERSIONSTRING, SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, realwidth, realheight, flags);