summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/setup_audio.cpp14
1 files changed, 3 insertions, 11 deletions
diff --git a/src/gui/setup_audio.cpp b/src/gui/setup_audio.cpp
index 3f98c44f..05a9eaa2 100644
--- a/src/gui/setup_audio.cpp
+++ b/src/gui/setup_audio.cpp
@@ -31,8 +31,6 @@
#include "configuration.h"
#include "log.h"
#include "sound.h"
-#include "map.h"
-#include "engine.h"
#include "utils/gettext.h"
@@ -41,8 +39,8 @@ Setup_Audio::Setup_Audio():
mSfxVolume((int)config.getValue("sfxVolume", 100)),
mSoundEnabled(config.getValue("sound", 0)),
mSoundCheckBox(new CheckBox(_("Sound"), mSoundEnabled)),
- mSfxSlider(new Slider(0, 128)),
- mMusicSlider(new Slider(0, 128))
+ mSfxSlider(new Slider(0, sound.getMaxVolume())),
+ mMusicSlider(new Slider(0, sound.getMaxVolume()))
{
setName(_("Audio"));
setDimension(gcn::Rectangle(0, 0, 250, 200));
@@ -96,12 +94,6 @@ void Setup_Audio::apply()
new OkDialog("Sound Engine", err);
logger->log("Warning: %s", err);
}
-
- if (engine)
- {
- Map *currentMap = engine->getCurrentMap();
- sound.playMusic(currentMap->getProperty("music"), -1);
- }
}
else
{
@@ -134,6 +126,6 @@ void Setup_Audio::action(const gcn::ActionEvent &event)
else if (event.getId() == "music")
{
config.setValue("musicVolume", (int) mMusicSlider->getValue());
- sound.setMusicVolume((int)mMusicSlider->getValue());
+ sound.setMusicVolume((int) mMusicSlider->getValue());
}
}