aboutsummaryrefslogtreecommitdiff
path: root/engines/agi/saveload.cpp
diff options
context:
space:
mode:
authorMartin Kiewitz2016-01-31 22:14:35 +0100
committerMartin Kiewitz2016-01-31 22:14:35 +0100
commita9b25b53d7a7084941553166abd20a602e83e184 (patch)
treeacac0d2b174b060b16e0ae2cdcd66121b2f57c16 /engines/agi/saveload.cpp
parentfd9c46831df3bcd09bc6f85d5e41c2beb3f7c024 (diff)
downloadscummvm-rg350-a9b25b53d7a7084941553166abd20a602e83e184.tar.gz
scummvm-rg350-a9b25b53d7a7084941553166abd20a602e83e184.tar.bz2
scummvm-rg350-a9b25b53d7a7084941553166abd20a602e83e184.zip
AGI: properly implement volume control + sync
Original code did assume that AGI volume level is 0-15 (0 for silence, 15 for maximum volume). It actually is the other way. 0 is maximum, 15 is silence. Fixed that. Also implemented sync with ScummVM settings dialog. In case "mute" is enabled by the user, any volume changes done by scripts are ignored. Fixes Manhunter 1 Apple IIgs not getting sound anymore since the VM Var cleanup (the script volume change by the scripts didn't reach us before)
Diffstat (limited to 'engines/agi/saveload.cpp')
-rw-r--r--engines/agi/saveload.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/engines/agi/saveload.cpp b/engines/agi/saveload.cpp
index b47a0cf43f..6b1b5495f7 100644
--- a/engines/agi/saveload.cpp
+++ b/engines/agi/saveload.cpp
@@ -703,6 +703,9 @@ int AgiEngine::loadGame(const Common::String &fileName, bool checkId) {
// copy everything over (we should probably only copy over the remaining parts of the screen w/o play screen
_gfx->copyDisplayRectToScreen(0, 0, DISPLAY_WIDTH, DISPLAY_HEIGHT);
+ // Sync volume settings from ScummVM system settings, so that VM volume variable is overwritten
+ setVolumeViaSystemSetting();
+
return errOK;
}