Browse files

SDLVideo: add a cmake option to disable the FPS limiting

  • Loading branch information...
1 parent fabdcaa commit 5b56ee305168fb0962757a9b0d751eaf88fbc154 @lynxlynxlynx lynxlynxlynx committed May 2, 2014
Showing with 4 additions and 1 deletion.
  1. +1 −0 cmake/cmake_config.h.in
  2. +3 −1 gemrb/plugins/SDLVideo/SDLVideo.cpp
View
1 cmake/cmake_config.h.in
@@ -12,6 +12,7 @@
#cmakedefine SYSCONFDIR "${SYSCONF_DIR}"
#cmakedefine NOCOLOR ${NOCOLOR}
#cmakedefine USE_OPENGL ${USE_OPENGL}
+#cmakedefine NOFPSLIMIT ${NOFPSLIMIT}
#cmakedefine HAVE_MALLOC_H 1
#cmakedefine HAVE_UNISTD_H 1
#cmakedefine WIN32_USE_STDIO 1
View
4 gemrb/plugins/SDLVideo/SDLVideo.cpp
@@ -100,7 +100,9 @@ int SDLVideoDriver::SwapBuffers(void)
unsigned long time;
time = GetTickCount();
if (( time - lastTime ) < 33) {
- //SDL_Delay( 33 - (time - lastTime) );
+#ifndef NOFPSLIMIT
+ SDL_Delay( 33 - (time - lastTime) );
+#endif
time = GetTickCount();
}
lastTime = time;

0 comments on commit 5b56ee3

Please sign in to comment.