aboutsummaryrefslogtreecommitdiff
path: root/gui.cpp
diff options
context:
space:
mode:
authorMax Horn2002-07-13 17:54:20 +0000
committerMax Horn2002-07-13 17:54:20 +0000
commit101613f6fd6226bd0d205efe395de4e2b1009731 (patch)
tree7854d770cd82eac63cf125370631eade4c660070 /gui.cpp
parentdfdd2d407da4c6f564ae588dcbea443102a534d7 (diff)
downloadscummvm-rg350-101613f6fd6226bd0d205efe395de4e2b1009731.tar.gz
scummvm-rg350-101613f6fd6226bd0d205efe395de4e2b1009731.tar.bz2
scummvm-rg350-101613f6fd6226bd0d205efe395de4e2b1009731.zip
cleanup
svn-id: r4539
Diffstat (limited to 'gui.cpp')
-rw-r--r--gui.cpp48
1 files changed, 24 insertions, 24 deletions
diff --git a/gui.cpp b/gui.cpp
index 18fe508677..db4f59a7e1 100644
--- a/gui.cpp
+++ b/gui.cpp
@@ -598,34 +598,34 @@ void Gui::leftMouseClick(int x, int y)
void Gui::handleSoundDialogCommand(int cmd)
{
- if (cmd == 40 || cmd == 50) {
- if (cmd == 40) {
- _s->_sound_volume_master = _gui_variables[0]; // Master
- _s->_sound_volume_music = _gui_variables[1]; // Music
- _s->_sound_volume_sfx = _gui_variables[2]; // SFX
-
- IMuse *imuse = _s->_imuse;
- imuse->set_music_volume(_s->_sound_volume_music);
- imuse->set_master_volume(_s->_sound_volume_master);
- _s->_mixer->set_volume(_s->_sound_volume_sfx);
- scummcfg->set("master_volume", _s->_sound_volume_master);
- scummcfg->set("music_volume", _s->_sound_volume_music);
- scummcfg->set("sfx_volume", _s->_sound_volume_sfx);
- scummcfg->flush();
- }
+ if (cmd == 50) {
+ close();
+ } else if (cmd == 40) {
+ _s->_sound_volume_master = _gui_variables[0]; // Master
+ _s->_sound_volume_music = _gui_variables[1]; // Music
+ _s->_sound_volume_sfx = _gui_variables[2]; // SFX
+
+ IMuse *imuse = _s->_imuse;
+ imuse->set_music_volume(_s->_sound_volume_music);
+ imuse->set_master_volume(_s->_sound_volume_master);
+ _s->_mixer->set_volume(_s->_sound_volume_sfx);
+ scummcfg->set("master_volume", _s->_sound_volume_master);
+ scummcfg->set("music_volume", _s->_sound_volume_music);
+ scummcfg->set("sfx_volume", _s->_sound_volume_sfx);
+ scummcfg->flush();
close();
- return;
- }
- if ((cmd % 10) == 1) {
- if (_gui_variables[cmd / 10] < 100)
- _gui_variables[cmd / 10] += 5;
} else {
- if (_gui_variables[cmd / 10] > 0)
- _gui_variables[cmd / 10] -= 5;
- }
+ if ((cmd % 10) == 1) {
+ if (_gui_variables[cmd / 10] < 100)
+ _gui_variables[cmd / 10] += 5;
+ } else {
+ if (_gui_variables[cmd / 10] > 0)
+ _gui_variables[cmd / 10] -= 5;
+ }
- draw((cmd / 10) * 10 + 3, (cmd / 10) * 10 + 3);
+ draw((cmd / 10) * 10 + 3, (cmd / 10) * 10 + 3);
+ }
}
void Gui::handleOptionsDialogCommand(int cmd)