From 77c205677b99af7f0dd31e8833887d75e89db7d1 Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Wed, 7 Sep 2022 21:06:37 +0200 Subject: [PATCH] changed resizing window instead of recreating it on window size changes This has the advantage that the window stays at its screen position instead of always being newly created in the middle of the screen. --- src/libgame/sdl.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/libgame/sdl.c b/src/libgame/sdl.c index fe859452..094b6565 100644 --- a/src/libgame/sdl.c +++ b/src/libgame/sdl.c @@ -589,8 +589,7 @@ static boolean SDLCreateScreen(boolean fullscreen) if (sdl_window) { - SDL_DestroyWindow(sdl_window); - sdl_window = NULL; + SDL_SetWindowSize(sdl_window, video.window_width, video.window_height); } } -- 2.34.1