projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added macros for converting vsync mode string and integer values
[rocksndiamonds.git]
/
src
/
libgame
/
sdl.c
diff --git
a/src/libgame/sdl.c
b/src/libgame/sdl.c
index c7a87297821c5fecb4e4c0cdae20f406711fc4a6..d34feb4cd2b93af6c4319b210a13520313bf669a 100644
(file)
--- a/
src/libgame/sdl.c
+++ b/
src/libgame/sdl.c
@@
-877,10
+877,7
@@
void SDLSetScreenRenderingMode(char *screen_rendering_mode)
void SDLSetScreenVsyncMode(char *vsync_mode)
{
void SDLSetScreenVsyncMode(char *vsync_mode)
{
- int interval =
- (strEqual(vsync_mode, STR_VSYNC_MODE_NORMAL) ? VSYNC_MODE_NORMAL :
- strEqual(vsync_mode, STR_VSYNC_MODE_ADAPTIVE) ? VSYNC_MODE_ADAPTIVE :
- VSYNC_MODE_OFF);
+ int interval = VSYNC_MODE_STR_TO_INT(vsync_mode);
int result = SDL_GL_SetSwapInterval(interval);
// if adaptive vsync requested, but not supported, retry with normal vsync
int result = SDL_GL_SetSwapInterval(interval);
// if adaptive vsync requested, but not supported, retry with normal vsync