From a9b25b53d7a7084941553166abd20a602e83e184 Mon Sep 17 00:00:00 2001 From: Martin Kiewitz Date: Sun, 31 Jan 2016 22:14:35 +0100 Subject: 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) --- engines/agi/agi.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'engines/agi/agi.cpp') diff --git a/engines/agi/agi.cpp b/engines/agi/agi.cpp index c8490d4a89..9c66c38487 100644 --- a/engines/agi/agi.cpp +++ b/engines/agi/agi.cpp @@ -184,6 +184,12 @@ int AgiEngine::agiInit() { _game.mouseFence.setWidth(0); // Reset + // Reset in-game timer + inGameTimerReset(); + + // Sync volume settings from ScummVM system settings + setVolumeViaSystemSetting(); + return ec; } -- cgit v1.2.3