mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-13 21:31:53 +00:00
ENGINES: Initialize mixer volume levels to levels from config so engine isn't required to call syncSoundSettings at startup.
This commit is contained in:
parent
bd23058120
commit
5b48ceb68a
@ -178,6 +178,8 @@ Engine::Engine(OSystem *syst)
|
||||
// Note: Using this dummy palette will actually disable cursor
|
||||
// palettes till the user enables it again.
|
||||
CursorMan.pushCursorPalette(NULL, 0, 0);
|
||||
|
||||
defaultSyncSoundSettings();
|
||||
}
|
||||
|
||||
Engine::~Engine() {
|
||||
@ -793,6 +795,10 @@ void Engine::setGameToLoadSlot(int slot) {
|
||||
}
|
||||
|
||||
void Engine::syncSoundSettings() {
|
||||
defaultSyncSoundSettings();
|
||||
}
|
||||
|
||||
void Engine::defaultSyncSoundSettings() {
|
||||
// Sync the engine with the config manager
|
||||
int soundVolumeMusic = ConfMan.getInt("music_volume");
|
||||
int soundVolumeSFX = ConfMan.getInt("sfx_volume");
|
||||
|
@ -657,6 +657,12 @@ public:
|
||||
virtual int getAutosaveSlot() const {
|
||||
return 0;
|
||||
}
|
||||
|
||||
protected:
|
||||
/**
|
||||
* Syncs the engine's mixer using the default volume syncing behavior.
|
||||
*/
|
||||
void defaultSyncSoundSettings();
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user