[Fix] FPS limiting.

This commit is contained in:
Allanis 2013-08-03 15:00:26 +01:00
parent 7f2119e705
commit c58e73ade2

View File

@ -334,7 +334,7 @@ static void fps_control(void) {
/* If the fps is limited.. */ /* If the fps is limited.. */
if((max_fps != 0) && (cur_dt < 1./max_fps)) { if((max_fps != 0) && (cur_dt < 1./max_fps)) {
delay = 1./max_fps - cur_dt; delay = 1./max_fps - cur_dt;
SDL_Delay(delay); SDL_Delay((unsigned int)(delay*1000));
fps_dt += delay; /* Make sure it displays the propper FPS. */ fps_dt += delay; /* Make sure it displays the propper FPS. */
} }
} }