From a780d11c48d0901a9e019687ce127a1d4f4672fb Mon Sep 17 00:00:00 2001 From: Kyle K Date: Mon, 18 Jul 2011 11:03:31 -0500 Subject: sdl: implement loading config file using Lua --- sdl/sdltools.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'sdl/sdltools.c') 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 }; -- cgit v1.2.3