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);
|
Common::InSaveFile *in = saveFileMan->openForLoading(*file);
|
||||||
if (in) {
|
if (in) {
|
||||||
Draci::DraciSavegameHeader header;
|
Draci::DraciSavegameHeader header;
|
||||||
Draci::readSavegameHeader(in, header);
|
if (Draci::readSavegameHeader(in, header)) {
|
||||||
saveList.push_back(SaveStateDescriptor(slotNum, header.saveName));
|
saveList.push_back(SaveStateDescriptor(slotNum, header.saveName));
|
||||||
if (header.thumbnail) delete header.thumbnail;
|
if (header.thumbnail) {
|
||||||
|
header.thumbnail->free();
|
||||||
|
delete header.thumbnail;
|
||||||
|
}
|
||||||
|
}
|
||||||
delete in;
|
delete in;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -269,8 +269,12 @@ void Sound::stopAll() {
|
||||||
|
|
||||||
void Sound::setVolume() {
|
void Sound::setVolume() {
|
||||||
// TODO: how to retrieve "Mute All" ?
|
// TODO: how to retrieve "Mute All" ?
|
||||||
|
if (_mixer->isReady()) {
|
||||||
_muteSound = ConfMan.getBool("sfx_mute");
|
_muteSound = ConfMan.getBool("sfx_mute");
|
||||||
_muteVoice = ConfMan.getBool("speech_mute");
|
_muteVoice = ConfMan.getBool("speech_mute");
|
||||||
|
} else {
|
||||||
|
_muteSound = _muteVoice = true;
|
||||||
|
}
|
||||||
_showSubtitles = ConfMan.getBool("subtitles");
|
_showSubtitles = ConfMan.getBool("subtitles");
|
||||||
_talkSpeed = ConfMan.getInt("talkspeed");
|
_talkSpeed = ConfMan.getInt("talkspeed");
|
||||||
const int soundVolume = ConfMan.getInt("sfx_volume");
|
const int soundVolume = ConfMan.getInt("sfx_volume");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue