aboutsummaryrefslogtreecommitdiff
path: root/engines/sherlock/tattoo/widget_options.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2015-08-15 12:30:04 -0400
committerPaul Gilbert2015-08-15 12:30:04 -0400
commit21028131cfb64538b3311b4d807cbbec14cfdcd0 (patch)
tree7a9709e826c0ee2c26c6a6cd53cbfaf5f926aef0 /engines/sherlock/tattoo/widget_options.cpp
parent5deb89689075c07284123084fbf56bde64d5ee56 (diff)
downloadscummvm-rg350-21028131cfb64538b3311b4d807cbbec14cfdcd0.tar.gz
scummvm-rg350-21028131cfb64538b3311b4d807cbbec14cfdcd0.tar.bz2
scummvm-rg350-21028131cfb64538b3311b4d807cbbec14cfdcd0.zip
SHERLOCK: RT: Implemented setMusicVolume, cleanup of sound code
Diffstat (limited to 'engines/sherlock/tattoo/widget_options.cpp')
-rw-r--r--engines/sherlock/tattoo/widget_options.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/engines/sherlock/tattoo/widget_options.cpp b/engines/sherlock/tattoo/widget_options.cpp
index 574f6a896f..5dc6fc55b9 100644
--- a/engines/sherlock/tattoo/widget_options.cpp
+++ b/engines/sherlock/tattoo/widget_options.cpp
@@ -112,10 +112,9 @@ void WidgetOptions::handleEvents() {
if (_midiSliderX > _bounds.width() - _surface.widestChar())
_midiSliderX = _bounds.width() - _surface.widestChar();
- int temp = music._musicVolume;
- music._musicVolume = (_midiSliderX - _surface.widestChar()) * 255 / (_bounds.width() - _surface.widestChar() * 2);
- if (music._musicVolume != temp) {
- music.setMIDIVolume(music._musicVolume);
+ int newVolume = (_midiSliderX - _surface.widestChar()) * 255 / (_bounds.width() - _surface.widestChar() * 2);
+ if (newVolume != music._musicVolume) {
+ music.setMusicVolume(newVolume);
vm.saveConfig();
}