Skip to content

Commit

Permalink
SCI: call resetGlobalPauseCounter() when loading from original save/l…
Browse files Browse the repository at this point in the history
…oad dialog

This was done only for the ScummVM save/load dialogs, but there are situations
where the global pause counter runs out of sync regardless of whether these
dialogs or the original ones get used (e. g. bug no. 15336). The counter should
always be 0 after loading a savegame.
  • Loading branch information
athrxx authored and bluegr committed Aug 29, 2024
1 parent e77296b commit c6882da
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions engines/sci/engine/kfile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1286,6 +1286,8 @@ reg_t kRestoreGame(EngineState *s, int argc, reg_t *argv) {
g_sci->_soundCmd->pauseAll(false); // unpause music
else
g_sci->_soundCmd->resetGlobalPauseCounter(); // reset music global pause counter without affecting the individual sounds
} else if (s->r_acc.isNull() && g_sci->_soundCmd->isGlobalPauseActive()) {
g_sci->_soundCmd->resetGlobalPauseCounter(); // reset music global pause counter without affecting the individual sounds
}

return s->r_acc;
Expand Down

0 comments on commit c6882da

Please sign in to comment.