[Scummvm-git-logs] scummvm master -> 8fb2371f6fde6f82608b1f40e446cce2f5f8bf26

dreammaster dreammaster at scummvm.org
Sat Sep 9 17:01:51 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:
8fb2371f6f TITANIC: Fix play/stop operation for 1st Class Restaurant Phonograph


Commit: 8fb2371f6fde6f82608b1f40e446cce2f5f8bf26
    https://github.com/scummvm/scummvm/commit/8fb2371f6fde6f82608b1f40e446cce2f5f8bf26
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2017-09-09T11:01:45-04:00

Commit Message:
TITANIC: Fix play/stop operation for 1st Class Restaurant Phonograph

Changed paths:
    engines/titanic/game/stop_phonograph_button.cpp
    engines/titanic/game/stop_phonograph_button.h


diff --git a/engines/titanic/game/stop_phonograph_button.cpp b/engines/titanic/game/stop_phonograph_button.cpp
index 51a7db3..fb34512 100644
--- a/engines/titanic/game/stop_phonograph_button.cpp
+++ b/engines/titanic/game/stop_phonograph_button.cpp
@@ -26,7 +26,7 @@ namespace Titanic {
 
 BEGIN_MESSAGE_MAP(CStopPhonographButton, CBackground)
 	ON_MESSAGE(MouseButtonDownMsg)
-	ON_MESSAGE(MouseButtonUpMsg)
+	ON_MESSAGE(TimerMsg)
 END_MESSAGE_MAP()
 
 void CStopPhonographButton::save(SimpleFile *file, int indent) {
@@ -45,17 +45,7 @@ bool CStopPhonographButton::MouseButtonDownMsg(CMouseButtonDownMsg *msg) {
 
 	if (!queryMsg._value) {
 		playMovie(0, 1, 0);
-	}
-
-	return true;
-}
-
-bool CStopPhonographButton::MouseButtonUpMsg(CMouseButtonUpMsg *msg) {
-	CQueryPhonographState queryMsg;
-	queryMsg.execute(getParent());
-
-	if (!queryMsg._value) {
-		playMovie(1, 0, 0);
+		addTimer(200);
 
 		CPhonographStopMsg stopMsg;
 		stopMsg.execute(getParent());
@@ -64,4 +54,9 @@ bool CStopPhonographButton::MouseButtonUpMsg(CMouseButtonUpMsg *msg) {
 	return true;
 }
 
+bool CStopPhonographButton::TimerMsg(CTimerMsg *msg) {
+	playMovie(1, 0, 0);
+	return true;
+}
+
 } // End of namespace Titanic
diff --git a/engines/titanic/game/stop_phonograph_button.h b/engines/titanic/game/stop_phonograph_button.h
index 9388e6e..07a19cc 100644
--- a/engines/titanic/game/stop_phonograph_button.h
+++ b/engines/titanic/game/stop_phonograph_button.h
@@ -30,7 +30,7 @@ namespace Titanic {
 class CStopPhonographButton : public CBackground {
 	DECLARE_MESSAGE_MAP;
 	bool MouseButtonDownMsg(CMouseButtonDownMsg *msg);
-	bool MouseButtonUpMsg(CMouseButtonUpMsg *msg);
+	bool TimerMsg(CTimerMsg *msg);
 public:
 	CLASSDEF;
 





More information about the Scummvm-git-logs mailing list