projects
/
rocksndiamonds.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8251414
)
changed resizing window instead of recreating it on window size changes
author
Holger Schemel
<info@artsoft.org>
Wed, 7 Sep 2022 19:06:37 +0000
(21:06 +0200)
committer
Holger Schemel
<info@artsoft.org>
Wed, 7 Sep 2022 19:21:07 +0000
(21:21 +0200)
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
patch
|
blob
|
history
diff --git
a/src/libgame/sdl.c
b/src/libgame/sdl.c
index fe859452a07fc7fed8d6ca2b47b3114d735a628a..094b656511e88ae2614a4503345fbe610e46951a 100644
(file)
--- 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);
}
}