Skip to content

Commit

Permalink
PEGASUS: Fix possible timer "skip" when resuming
Browse files Browse the repository at this point in the history
pause/resume need to treat things a bit differently from the normal setRate function. This caused a jump in a timer when resuming from the pause menu in certain cases, though not all the time.

Regression from b50cac6, which was part of the fix for the lid animations.
  • Loading branch information
Matthew Hoops committed Jul 21, 2013
1 parent b79fd7e commit 4e9e2f4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions engines/pegasus/timers.cpp
Expand Up @@ -115,15 +115,15 @@ void TimeBase::stop() {
void TimeBase::pause() {
if (isRunning() && !_paused) {
_pausedRate = getRate();
stop();
_rate = 0;
_paused = true;
_pauseStart = g_system->getMillis();
}
}

void TimeBase::resume() {
if (_paused) {
setRate(_pausedRate);
_rate = _pausedRate;
_paused = false;

if (isRunning())
Expand Down

0 comments on commit 4e9e2f4

Please sign in to comment.