| @@ -472,18 +472,20 @@ void Ticker::TickDraw() | |||||
| /* Clamp FPS */ | /* Clamp FPS */ | ||||
| Profiler::Stop(Profiler::STAT_TICK_BLIT); | Profiler::Stop(Profiler::STAT_TICK_BLIT); | ||||
| #if !EMSCRIPTEN | |||||
| /* If framerate is fixed, force wait time to 1/FPS. Otherwise, set wait | /* If framerate is fixed, force wait time to 1/FPS. Otherwise, set wait | ||||
| * time to 0. */ | * time to 0. */ | ||||
| float frametime = data->fps ? 1.f / data->fps : 0.f; | float frametime = data->fps ? 1.f / data->fps : 0.f; | ||||
| if (frametime > data->bias + .2f) | if (frametime > data->bias + .2f) | ||||
| frametime = data->bias + .2f; // Don't go below 5 fps | |||||
| frametime = data->bias + .2f; /* Don't go below 5 fps */ | |||||
| if (frametime > data->bias) | if (frametime > data->bias) | ||||
| data->timer.Wait(frametime - data->bias); | data->timer.Wait(frametime - data->bias); | ||||
| /* If recording, do not try to compensate for lag. */ | /* If recording, do not try to compensate for lag. */ | ||||
| if (!data->recording) | if (!data->recording) | ||||
| data->bias -= frametime; | data->bias -= frametime; | ||||
| #endif | |||||
| } | } | ||||
| void Ticker::StartRecording() | void Ticker::StartRecording() | ||||