aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Horn2002-08-18 18:15:15 +0000
committerMax Horn2002-08-18 18:15:15 +0000
commit28058407c1377722fc8f3956504689d05b949914 (patch)
tree9182005f2f10502191f4a18e747e8340b12bcc33
parent12b08c9ba13f628b921888ae53265d6ff1429fac (diff)
downloadscummvm-rg350-28058407c1377722fc8f3956504689d05b949914.tar.gz
scummvm-rg350-28058407c1377722fc8f3956504689d05b949914.tar.bz2
scummvm-rg350-28058407c1377722fc8f3956504689d05b949914.zip
fixed simon crasher
svn-id: r4760
-rw-r--r--simon/simon.cpp19
1 files changed, 8 insertions, 11 deletions
diff --git a/simon/simon.cpp b/simon/simon.cpp
index 67ea4d9092..a379006052 100644
--- a/simon/simon.cpp
+++ b/simon/simon.cpp
@@ -126,8 +126,13 @@ SimonState::SimonState(GameDetector *detector, OSystem *syst)
midi.set_driver(driver);
_game = detector->_gameId;
- set_volume(detector->_sfx_volume);
_game_path = detector->_gameDataPath;
+
+ /* Setup mixer */
+ if (!_mixer->bind_to_system(syst))
+ warning("Sound initialization failed. "
+ "Features of the game that depend on sound synchronization will most likely break");
+ set_volume(detector->_sfx_volume);
}
SimonState::~SimonState()
@@ -141,15 +146,7 @@ SimonState::~SimonState()
SimonState *SimonState::createFromDetector(GameDetector *detector, OSystem *syst)
{
- SimonState *s = new SimonState(detector, syst);
-
- /* Setup mixer */
- if (!s->_mixer->bind_to_system(syst))
- warning("Sound initialization failed. "
- "Features of the game that depend on sound synchronization will most likely break");
-
- return s;
-
+ return new SimonState(detector, syst);
}
void palette_fadeout(uint32 *pal_values, uint num)
@@ -4948,7 +4945,7 @@ void SimonState::dx_unlock_attached()
void SimonState::set_volume(byte volume)
{
- _mixer->set_volume(volume * 256 / 100);
+ _mixer->set_volume(volume);
}