mirror of
https://github.com/scummvm/scummvm.git
synced 2026-06-20 05:45:29 +00:00
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 b50cac637e, which was part of the fix for the lid animations.
This commit is contained in:
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user