Don't crash without sound support.

svn-id: r45137
This commit is contained in:
Robert Špalek 2009-10-15 23:57:13 +00:00
parent 71d4d12a82
commit dddce5d97b
2 changed files with 13 additions and 5 deletions

View file

@ -143,9 +143,13 @@ SaveStateList DraciMetaEngine::listSaves(const char *target) const {
Common::InSaveFile *in = saveFileMan->openForLoading(*file);
if (in) {
Draci::DraciSavegameHeader header;
Draci::readSavegameHeader(in, header);
if (Draci::readSavegameHeader(in, header)) {
saveList.push_back(SaveStateDescriptor(slotNum, header.saveName));
if (header.thumbnail) delete header.thumbnail;
if (header.thumbnail) {
header.thumbnail->free();
delete header.thumbnail;
}
}
delete in;
}
}

View file

@ -269,8 +269,12 @@ void Sound::stopAll() {
void Sound::setVolume() {
// TODO: how to retrieve "Mute All" ?
if (_mixer->isReady()) {
_muteSound = ConfMan.getBool("sfx_mute");
_muteVoice = ConfMan.getBool("speech_mute");
} else {
_muteSound = _muteVoice = true;
}
_showSubtitles = ConfMan.getBool("subtitles");
_talkSpeed = ConfMan.getInt("talkspeed");
const int soundVolume = ConfMan.getInt("sfx_volume");