mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-02 08:55:45 +00:00
CGE2: Fix initialization of volume switches.
This commit is contained in:
parent
b33653000d
commit
fc8f6d9cfe
@ -218,6 +218,7 @@ public:
|
||||
void switchSay();
|
||||
void checkSaySwitch();
|
||||
void initToolbar();
|
||||
void initVolumeSwitch(Sprite *volSwitch);
|
||||
|
||||
void checkSounds();
|
||||
|
||||
|
@ -281,9 +281,16 @@ void CGE2Engine::initToolbar() {
|
||||
_vol[1] = _vga->_showQ->locate(kMvolRef);
|
||||
|
||||
if (_vol[0])
|
||||
_vol[0]->step(ConfMan.getInt("sfx_volume") / kSoundNumtoStateRate);
|
||||
initVolumeSwitch(_vol[0]);
|
||||
if (_vol[1])
|
||||
_vol[1]->step(ConfMan.getInt("music_volume") / kSoundNumtoStateRate);
|
||||
initVolumeSwitch(_vol[1]);
|
||||
}
|
||||
|
||||
void CGE2Engine::initVolumeSwitch(Sprite *volSwitch) {
|
||||
int state = 0;
|
||||
if (!ConfMan.getBool("mute"))
|
||||
state = ConfMan.getInt("sfx_volume") / kSoundNumtoStateRate;
|
||||
volSwitch->step(state);
|
||||
}
|
||||
|
||||
} // End of namespace CGE2
|
||||
|
Loading…
x
Reference in New Issue
Block a user