From: Holger Schemel Date: Wed, 7 Sep 2022 19:06:37 +0000 (+0200) Subject: changed resizing window instead of recreating it on window size changes X-Git-Tag: 4.3.3.0~60 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=77c205677b99af7f0dd31e8833887d75e89db7d1;p=rocksndiamonds.git 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. --- 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); } }