Revert "use desktop resolution for stuff"

This reverts commit a54384a579.
This commit is contained in:
Alug committed 2024-03-06 09:27:06 +01:00
1 parent 72f0552ef1
commit 7c9c28f026
1 file changed
+3 -11
+3 -11
View File
@@ -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, &currentWindowMode);
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, &currentWindowMode);
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, &currentDisplayMode);
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);