mirror of
https://github.com/scummvm/scummvm.git
synced 2026-06-20 05:45:29 +00:00
DRAGONS: Update engine volumes after returning from options menu #11585
This commit is contained in:
@@ -1797,6 +1797,11 @@ void DragonsEngine::clearAllText() {
|
||||
_fontManager->clearText();
|
||||
}
|
||||
|
||||
void DragonsEngine::syncSoundSettings() {
|
||||
Engine::syncSoundSettings();
|
||||
_sound->syncSoundSettings();
|
||||
}
|
||||
|
||||
void (*DragonsEngine::getSceneUpdateFunction())() {
|
||||
return _sceneUpdateFunction;
|
||||
}
|
||||
|
||||
@@ -245,6 +245,7 @@ public:
|
||||
bool canLoadGameStateCurrently() override;
|
||||
Common::Error saveGameState(int slot, const Common::String &desc, bool isAutosave) override;
|
||||
bool canSaveGameStateCurrently() override;
|
||||
void syncSoundSettings() override;
|
||||
|
||||
void updateActorSequences();
|
||||
void setFlags(uint32 flags);
|
||||
|
||||
@@ -538,4 +538,12 @@ void SoundManager::playMusic(int16 song) {
|
||||
delete seq;
|
||||
}
|
||||
|
||||
void SoundManager::syncSoundSettings() {
|
||||
_musicVolume = CLIP<int>(ConfMan.getInt("music_volume"), 0, 255);
|
||||
_sfxVolume = CLIP<int>(ConfMan.getInt("sfx_volume"), 0, 255);
|
||||
_speechVolume = CLIP<int>(ConfMan.getInt("speech_volume"), 0, 255);
|
||||
|
||||
_midiPlayer->setVolume(_musicVolume);
|
||||
}
|
||||
|
||||
} // End of namespace Dragons
|
||||
|
||||
@@ -59,6 +59,7 @@ public:
|
||||
void playSpeech(uint32 textIndex);
|
||||
bool isSpeechPlaying();
|
||||
void resumeMusic();
|
||||
void syncSoundSettings();
|
||||
|
||||
public:
|
||||
uint16 _dat_8006bb60_sound_related;
|
||||
|
||||
Reference in New Issue
Block a user