diff --git a/doomsday/engine/portable/src/dd_loop.c b/doomsday/engine/portable/src/dd_loop.c index d8b40629c8..6f0a8f0ae2 100644 --- a/doomsday/engine/portable/src/dd_loop.c +++ b/doomsday/engine/portable/src/dd_loop.c @@ -475,8 +475,6 @@ static void timeDeltaStatistics(int deltaMs) void DD_WaitForOptimalUpdateTime(void) { - if(Sys_IsShuttingDown()) return; // No need for finesse. - /// @todo This would benefit from microsecond-accurate timing. // All times are in milliseconds. @@ -488,6 +486,8 @@ void DD_WaitForOptimalUpdateTime(void) // accuracy, so we can't use fractions of a millisecond. const uint optimalDelta = (maxFrameRate > 0? 1000/maxFrameRate : 1); + if(Sys_IsShuttingDown()) return; // No need for finesse. + // This is when we would ideally like to make the update. targetUpdateTime = prevUpdateTime + optimalDelta;