diff options
Diffstat (limited to 'sdl/sdltools.c')
-rw-r--r-- | sdl/sdltools.c | 6 |
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 }; |