projects
/
rocksndiamonds.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2420800
)
added check for OpenGL renderer when trying to change vsync mode
author
Holger Schemel
<info@artsoft.org>
Sat, 5 Sep 2020 18:50:00 +0000
(20:50 +0200)
committer
Holger Schemel
<info@artsoft.org>
Sat, 5 Sep 2020 18:50:00 +0000
(20:50 +0200)
src/libgame/sdl.c
patch
|
blob
|
history
diff --git
a/src/libgame/sdl.c
b/src/libgame/sdl.c
index d34feb4cd2b93af6c4319b210a13520313bf669a..407667452dbac5f8632587e9014d403159acd1f8 100644
(file)
--- a/
src/libgame/sdl.c
+++ b/
src/libgame/sdl.c
@@
-877,6
+877,10
@@
void SDLSetScreenRenderingMode(char *screen_rendering_mode)
void SDLSetScreenVsyncMode(char *vsync_mode)
{
+ // changing vsync mode without re-creating renderer only supported by OpenGL
+ if (!strPrefixLower((char *)SDLGetRendererName(), "opengl"))
+ return;
+
int interval = VSYNC_MODE_STR_TO_INT(vsync_mode);
int result = SDL_GL_SetSwapInterval(interval);