diff options
-rw-r--r-- | scumm/saveload.cpp | 10 | ||||
-rw-r--r-- | scumm/scummvm.cpp | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/scumm/saveload.cpp b/scumm/saveload.cpp index 5345fccf81..5c624646ba 100644 --- a/scumm/saveload.cpp +++ b/scumm/saveload.cpp @@ -74,7 +74,7 @@ bool Scumm::saveState(int slot, bool compat, SaveFileManager *mgr) { Serializer ser(out, true, CURRENT_VER); saveOrLoad(&ser, CURRENT_VER); #ifdef __PALM_OS__ - if (_imuse) { // moved here to prevent stack overflow on palmos + if (_imuse && _saveSound) { // moved here to prevent stack overflow on palmos _imuse->save_or_load(&ser, this); _imuse->set_master_volume (_sound->_sound_volume_master); _imuse->set_music_volume (_sound->_sound_volume_music); @@ -136,7 +136,7 @@ bool Scumm::loadState(int slot, bool compat, SaveFileManager *mgr) { /* Nuke all resources */ for (i = rtFirst; i <= rtLast; i++) - if (i != rtTemp && i != rtBuffer) + if (i != rtTemp && i != rtBuffer && (i != rtSound || _saveSound)) for (j = 0; j < res.num[i]; j++) { nukeResource(i, j); res.flags[i][j] = 0; @@ -150,7 +150,7 @@ bool Scumm::loadState(int slot, bool compat, SaveFileManager *mgr) { Serializer ser(out, false, hdr.ver); saveOrLoad(&ser, hdr.ver); #ifdef __PALM_OS__ - if (_imuse) { // moved here to prevent stack overflow on palmos + if (_imuse && _saveSound) { // moved here to prevent stack overflow on palmos _imuse->save_or_load(&ser, this); _imuse->set_master_volume (_sound->_sound_volume_master); _imuse->set_music_volume (_sound->_sound_volume_music); @@ -586,7 +586,7 @@ void Scumm::saveOrLoad(Serializer *s, uint32 savegameVersion) { int var120Backup; int var98Backup; - if (!s->isSaving()) { + if (!s->isSaving() && _saveSound) { _sound->stopAllSounds(); if (_mixer) { if (_imuseDigital) { @@ -693,7 +693,7 @@ void Scumm::saveOrLoad(Serializer *s, uint32 savegameVersion) { } #ifndef __PALM_OS__// moved to ::loadState/saveState to prevent stack overflow on palmos - if (_imuse) { + if (_imuse && _saveSound) { _imuse->save_or_load(s, this); _imuse->set_master_volume (_sound->_sound_volume_master); _imuse->set_music_volume (_sound->_sound_volume_music); diff --git a/scumm/scummvm.cpp b/scumm/scummvm.cpp index 34a1d935c4..489ccf5f3e 100644 --- a/scumm/scummvm.cpp +++ b/scumm/scummvm.cpp @@ -367,7 +367,7 @@ Scumm::Scumm (GameDetector *detector, OSystem *syst) tempMusic = 0; _silentDigitalImuse = 0; _noDigitalSamples = 0; - _saveSound = 0; + _saveSound = 1; current_cd_sound = 0; _maxBoxVertexHeap = 0; _boxPathVertexHeapIndex = 0; |