mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-22 20:21:06 +00:00
make the volume controls in the global options dialog work
svn-id: r6863
This commit is contained in:
parent
023d84a6a3
commit
c409895483
@ -127,11 +127,11 @@ GlobalOptionsDialog::GlobalOptionsDialog(NewGui *gui, GameDetector &detector)
|
||||
if (dir) {
|
||||
_savePath->setLabel(dir);
|
||||
} else {
|
||||
// Default to the current directory...
|
||||
char buf[256];
|
||||
getcwd(buf, sizeof(buf));
|
||||
_savePath->setLabel(buf);
|
||||
}
|
||||
// If that is NULL, we should use the current directory...
|
||||
|
||||
//
|
||||
// Add OK & Cancel buttons
|
||||
@ -191,6 +191,9 @@ void GlobalOptionsDialog::handleCommand(CommandSender *sender, uint32 cmd, uint3
|
||||
case kOKCmd:
|
||||
// TODO Write back changes made to config object
|
||||
setResult(1);
|
||||
_detector._master_volume = _soundVolumeMaster;
|
||||
_detector._music_volume = _soundVolumeMusic;
|
||||
_detector._sfx_volume = _soundVolumeSfx;
|
||||
close();
|
||||
break;
|
||||
default:
|
||||
|
@ -216,7 +216,7 @@ Scumm::Scumm (GameDetector *detector, OSystem *syst)
|
||||
_sound = new Sound(this);
|
||||
_timer = Engine::_timer;
|
||||
|
||||
_sound->_sound_volume_master = 0;
|
||||
_sound->_sound_volume_master = detector->_master_volume;
|
||||
_sound->_sound_volume_sfx = detector->_sfx_volume;
|
||||
_sound->_sound_volume_music = detector->_music_volume;
|
||||
|
||||
|
@ -720,10 +720,6 @@ void Sound::setupSound() {
|
||||
if (_scumm->_imuse) {
|
||||
_scumm->_imuse->setBase(_scumm->res.address[rtSound]);
|
||||
|
||||
_sound_volume_music = g_config->getInt("music_volume", kDefaultMusicVolume);
|
||||
_sound_volume_master = g_config->getInt("master_volume", kDefaultMasterVolume);
|
||||
_sound_volume_sfx = g_config->getInt("sfx_volume", kDefaultSFXVolume);
|
||||
|
||||
_scumm->_imuse->set_master_volume(_sound_volume_master);
|
||||
_scumm->_imuse->set_music_volume(_sound_volume_music);
|
||||
_scumm->_mixer->setVolume(_sound_volume_sfx * _sound_volume_master / 255);
|
||||
|
Loading…
x
Reference in New Issue
Block a user