diff options
-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | src/game.cpp | 13 |
2 files changed, 12 insertions, 2 deletions
@@ -4,6 +4,7 @@ Added new market stand. * src/game.cpp, src/gui/setup_video.cpp, src/main.cpp: Fixed fps limiter issues and increased default limit to 60. + * src/game.cpp: Fixed fps limiter when disabled. 2006-09-05 Philipp Sehmisch <tmw@crushnet.org> diff --git a/src/game.cpp b/src/game.cpp index 630e40e5..dbdfe481 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -366,11 +366,20 @@ void Game::logic() // Update the screen when application is active, delay otherwise if (SDL_GetAppState() & SDL_APPACTIVE) { - while (abs(tick_time * 10 - drawTime) >= delta) { + if (fpsLimit == 0) { frame++; engine->draw(graphics); graphics->updateScreen(); - drawTime += delta; + drawTime = tick_time * 10; + } + else + { + while (abs(tick_time * 10 - drawTime) >= delta) { + frame++; + engine->draw(graphics); + graphics->updateScreen(); + drawTime += delta; + } } } else |