diff options
-rw-r--r-- | simon/simon.cpp | 19 |
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); } |