diff options
author | Torbjörn Andersson | 2008-11-09 11:52:52 +0000 |
---|---|---|
committer | Torbjörn Andersson | 2008-11-09 11:52:52 +0000 |
commit | 18414f0a0af7a2dabb6ad4d56573d4f00d9c2af3 (patch) | |
tree | 93182d9132804acfeb850c87059725e2db26d2b3 /engines | |
parent | 7b8ff8b75278e4c009478a7d7fed0bb27f80a1e5 (diff) | |
download | scummvm-rg350-18414f0a0af7a2dabb6ad4d56573d4f00d9c2af3.tar.gz scummvm-rg350-18414f0a0af7a2dabb6ad4d56573d4f00d9c2af3.tar.bz2 scummvm-rg350-18414f0a0af7a2dabb6ad4d56573d4f00d9c2af3.zip |
Moved sound-related settings to syncSoundSettings() for the global options dialog.
svn-id: r34947
Diffstat (limited to 'engines')
-rw-r--r-- | engines/sword2/sword2.cpp | 8 | ||||
-rw-r--r-- | engines/sword2/sword2.h | 10 |
2 files changed, 13 insertions, 5 deletions
diff --git a/engines/sword2/sword2.cpp b/engines/sword2/sword2.cpp index f1f880c11e..83235e1bde 100644 --- a/engines/sword2/sword2.cpp +++ b/engines/sword2/sword2.cpp @@ -307,7 +307,9 @@ void Sword2Engine::registerDefaultSettings() { ConfMan.registerDefault("reverse_stereo", false); } -void Sword2Engine::readSettings() { +void Sword2Engine::syncSoundSettings() { + // Sound settings. At the time of writing, not all of these can be set + // by the global options dialog, but it seems silly to split them up. _mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType, ConfMan.getInt("music_volume")); _mixer->setVolumeForSoundType(Audio::Mixer::kSpeechSoundType, ConfMan.getInt("speech_volume")); _mixer->setVolumeForSoundType(Audio::Mixer::kSFXSoundType, ConfMan.getInt("sfx_volume")); @@ -316,6 +318,10 @@ void Sword2Engine::readSettings() { _sound->muteSpeech(ConfMan.getBool("speech_mute")); _sound->muteFx(ConfMan.getBool("sfx_mute")); _sound->setReverseStereo(ConfMan.getBool("reverse_stereo")); +} + +void Sword2Engine::readSettings() { + syncSoundSettings(); _mouse->setObjectLabels(ConfMan.getBool("object_labels")); _screen->setRenderLevel(ConfMan.getInt("gfx_details")); } diff --git a/engines/sword2/sword2.h b/engines/sword2/sword2.h index 172dcea35c..cb2a8d5b80 100644 --- a/engines/sword2/sword2.h +++ b/engines/sword2/sword2.h @@ -122,17 +122,19 @@ private: StartUp _startList[MAX_starts]; -public: - Sword2Engine(OSystem *syst); - ~Sword2Engine(); - +protected: // Engine APIs virtual Common::Error init(); virtual Common::Error go(); virtual GUI::Debugger *getDebugger(); virtual bool hasFeature(EngineFeature f) const; + virtual void syncSoundSettings(); virtual void pauseEngineIntern(bool pause); +public: + Sword2Engine(OSystem *syst); + ~Sword2Engine(); + int getFramesPerSecond(); void registerDefaultSettings(); |