projects
/
rocksndiamonds.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
737e6b2
)
added storing current video vsync mode after setting it
author
Holger Schemel
<info@artsoft.org>
Thu, 3 Sep 2020 23:48:46 +0000
(
01:48
+0200)
committer
Holger Schemel
<info@artsoft.org>
Thu, 3 Sep 2020 23:52:24 +0000
(
01:52
+0200)
src/libgame/sdl.c
patch
|
blob
|
history
diff --git
a/src/libgame/sdl.c
b/src/libgame/sdl.c
index e561b177579961dea8066def3053a9cd2f284368..ab914a4e17c71778fb10b56c050c58f345b48133 100644
(file)
--- a/
src/libgame/sdl.c
+++ b/
src/libgame/sdl.c
@@
-876,7
+876,16
@@
void SDLSetScreenVsyncMode(char *vsync_mode)
// if adaptive vsync requested, but not supported, retry with normal vsync
if (result == -1 && interval == VSYNC_MODE_ADAPTIVE)
- SDL_GL_SetSwapInterval(VSYNC_MODE_NORMAL);
+ {
+ interval = VSYNC_MODE_NORMAL;
+
+ result = SDL_GL_SetSwapInterval(interval);
+ }
+
+ if (result == -1)
+ interval = VSYNC_MODE_OFF;
+
+ video.vsync_mode = interval;
}
void SDLRedrawWindow(void)