From 4e9e2f4feadebbe34b54bbd56b2d34f5a2e165ac Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Sat, 20 Jul 2013 23:00:43 -0400 Subject: PEGASUS: Fix possible timer "skip" when resuming 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 b50cac637ece07c87e39232a1e8fe7262ace06f2, which was part of the fix for the lid animations. --- engines/pegasus/timers.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'engines/pegasus') diff --git a/engines/pegasus/timers.cpp b/engines/pegasus/timers.cpp index 50cc9bc6d8..8463d866e8 100644 --- a/engines/pegasus/timers.cpp +++ b/engines/pegasus/timers.cpp @@ -115,7 +115,7 @@ void TimeBase::stop() { void TimeBase::pause() { if (isRunning() && !_paused) { _pausedRate = getRate(); - stop(); + _rate = 0; _paused = true; _pauseStart = g_system->getMillis(); } @@ -123,7 +123,7 @@ void TimeBase::pause() { void TimeBase::resume() { if (_paused) { - setRate(_pausedRate); + _rate = _pausedRate; _paused = false; if (isRunning()) -- cgit v1.2.3