Don't crash without sound support.
svn-id: r45137
This commit is contained in:
parent
71d4d12a82
commit
dddce5d97b
2 changed files with 13 additions and 5 deletions
|
@ -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);
|
||||
saveList.push_back(SaveStateDescriptor(slotNum, header.saveName));
|
||||
if (header.thumbnail) delete header.thumbnail;
|
||||
if (Draci::readSavegameHeader(in, header)) {
|
||||
saveList.push_back(SaveStateDescriptor(slotNum, header.saveName));
|
||||
if (header.thumbnail) {
|
||||
header.thumbnail->free();
|
||||
delete header.thumbnail;
|
||||
}
|
||||
}
|
||||
delete in;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -269,8 +269,12 @@ void Sound::stopAll() {
|
|||
|
||||
void Sound::setVolume() {
|
||||
// TODO: how to retrieve "Mute All" ?
|
||||
_muteSound = ConfMan.getBool("sfx_mute");
|
||||
_muteVoice = ConfMan.getBool("speech_mute");
|
||||
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");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue