[Scummvm-git-logs] scummvm master -> 75a736bbc86deacad64d9d7fc72901f19ed2846e

dreammaster dreammaster at scummvm.org
Sat Oct 14 01:54:02 CEST 2017


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
75a736bbc8 TITANIC: Workaround for wrong ambient music on load


Commit: 75a736bbc86deacad64d9d7fc72901f19ed2846e
    https://github.com/scummvm/scummvm/commit/75a736bbc86deacad64d9d7fc72901f19ed2846e
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2017-10-13T19:54:01-04:00

Commit Message:
TITANIC: Workaround for wrong ambient music on load

Changed paths:
    engines/titanic/sound/auto_music_player_base.cpp


diff --git a/engines/titanic/sound/auto_music_player_base.cpp b/engines/titanic/sound/auto_music_player_base.cpp
index 3737782..a22a113 100644
--- a/engines/titanic/sound/auto_music_player_base.cpp
+++ b/engines/titanic/sound/auto_music_player_base.cpp
@@ -21,6 +21,7 @@
  */
 
 #include "titanic/sound/auto_music_player_base.h"
+#include "titanic/game_manager.h"
 
 namespace Titanic {
 
@@ -69,9 +70,19 @@ bool CAutoMusicPlayerBase::TimerMsg(CTimerMsg *msg) {
 }
 
 bool CAutoMusicPlayerBase::LoadSuccessMsg(CLoadSuccessMsg *msg) {
-	if (_isEnabled)
+	if (_isEnabled) {
+		// WORKAROUND: A problem was encountered with the EmbLobby music player
+		// not getting turned off when room was left, so was turned on again
+		// when loading a savegame elsewhere. This guards against it
+		CRoomItem *newRoom = getGameManager()->getRoom();
+		if (findRoom() != newRoom) {
+			_isEnabled = false;
+			return true;
+		}
+
 		playAmbientSound(_filename, _volumeMode, _initialMute, true, 0,
 			Audio::Mixer::kMusicSoundType);
+	}
 
 	return true;
 }





More information about the Scummvm-git-logs mailing list