summaryrefslogtreecommitdiffstats
path: root/sdl/sdltools.c
diff options
context:
space:
mode:
authorKyle K <kylek389@gmail.com>2011-07-18 11:03:31 -0500
committerKamil Kaminski <kamilkss@gmail.com>2011-07-18 11:03:31 -0500
commita780d11c48d0901a9e019687ce127a1d4f4672fb (patch)
tree86928872ba8857b9881b02544d048809183f28eb /sdl/sdltools.c
parenta40d0cdbb0dff7cf2b65a18be7b7085f0eca3408 (diff)
downloadGLPyramid-a780d11c48d0901a9e019687ce127a1d4f4672fb.tar.gz
GLPyramid-a780d11c48d0901a9e019687ce127a1d4f4672fb.tar.bz2
GLPyramid-a780d11c48d0901a9e019687ce127a1d4f4672fb.zip
sdl: implement loading config file using Lua
Diffstat (limited to 'sdl/sdltools.c')
-rw-r--r--sdl/sdltools.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sdl/sdltools.c b/sdl/sdltools.c
index c98a968..aea91bb 100644
--- a/sdl/sdltools.c
+++ b/sdl/sdltools.c
@@ -12,6 +12,8 @@
#include "math3d.h"
#include "glframe.h"
+extern unsigned int maxfps_w;
+
/* creates a new mouse cursor from an XPM */
const char *arrow[] = {
/* width height num_colors chars_per_pixel */
@@ -59,8 +61,8 @@ const char *arrow[] = {
inline void sdlFrameControl(const unsigned int startclock)
{
unsigned int deltaclock = SDL_GetTicks() - startclock;
- if (deltaclock < 1000 / FRAMES_PER_SECOND)
- SDL_Delay((1000 / FRAMES_PER_SECOND) - deltaclock);
+ if (deltaclock < 1000 / maxfps_w)
+ SDL_Delay((1000 / maxfps_w) - deltaclock);
#ifdef STAT_FPS
char buffer[30] = { 0 };