[Change] Cosmetic tweakage.
This commit is contained in:
parent
8f87ad0392
commit
f5039ca320
@ -262,9 +262,12 @@ static double fps_dt = 1.;
|
|||||||
static double dt = 0.;
|
static double dt = 0.;
|
||||||
// @brief Controls the FPS.
|
// @brief Controls the FPS.
|
||||||
static void fps_control(void) {
|
static void fps_control(void) {
|
||||||
|
unsigned int t;
|
||||||
|
|
||||||
// dt in ms/1000.
|
// dt in ms/1000.
|
||||||
dt = (double)(SDL_GetTicks() - gtime) / 1000.;
|
t = SDL_GetTicks();
|
||||||
gtime = SDL_GetTicks();
|
dt = (double)(t-gtime)/1000.;
|
||||||
|
gtime = t;
|
||||||
|
|
||||||
if(paused) SDL_Delay(10); // Drop paused FPS to be nice to the CPU.
|
if(paused) SDL_Delay(10); // Drop paused FPS to be nice to the CPU.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user