[Scummvm-git-logs] scummvm master -> b88633251d04ad5c51a580164841614a127a4db5

sev- noreply at scummvm.org
Sun Feb 16 23:32:13 UTC 2025


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:
b88633251d DIRECTOR: XTRAS: Correctly process node change in MouseDown method in QTVR Xtra


Commit: b88633251d04ad5c51a580164841614a127a4db5
    https://github.com/scummvm/scummvm/commit/b88633251d04ad5c51a580164841614a127a4db5
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2025-02-17T00:32:04+01:00

Commit Message:
DIRECTOR: XTRAS: Correctly process node change in MouseDown method in QTVR Xtra

Changed paths:
    engines/director/lingo/xtras/qtvrxtra.cpp


diff --git a/engines/director/lingo/xtras/qtvrxtra.cpp b/engines/director/lingo/xtras/qtvrxtra.cpp
index 108ea05768c..a94f87e6037 100644
--- a/engines/director/lingo/xtras/qtvrxtra.cpp
+++ b/engines/director/lingo/xtras/qtvrxtra.cpp
@@ -452,6 +452,8 @@ void QtvrxtraXtra::m_QTVRMouseDown(int nargs) {
 	}
 
 	int nextTick = g_system->getMillis();
+	int node;
+	bool nodeChanged = false;
 
 	while (true) {
 		Graphics::Surface const *frame = me->_video->decodeNextFrame();
@@ -464,7 +466,7 @@ void QtvrxtraXtra::m_QTVRMouseDown(int nargs) {
 
 		g_director->getCurrentWindow()->setDirty(true);
 
-		int node = me->_video->getCurrentNodeID();
+		node = me->_video->getCurrentNodeID();
 
 		while (g_system->getEventManager()->pollEvent(event)) {
 			me->_widget->processEvent(event);
@@ -476,6 +478,8 @@ void QtvrxtraXtra::m_QTVRMouseDown(int nargs) {
 		if (node != 0 && me->_video->getCurrentNodeID() != node) {
 			if (!me->_nodeLeaveHandler.empty())
 				g_lingo->executeHandler(me->_nodeLeaveHandler);
+
+			nodeChanged = true;
 		}
 
 		if (g_system->getMillis() > nextTick) {
@@ -501,7 +505,10 @@ void QtvrxtraXtra::m_QTVRMouseDown(int nargs) {
 	hotspot = me->_video->getClickedHotspot();
 
 	if (!hotspot) {
-		g_lingo->push(Common::String("pan ,0"));
+		if (nodeChanged)
+			g_lingo->push(Common::String::format("jump,%d", node));
+		else
+			g_lingo->push(Common::String("pan ,0"));
 		return;
 	}
 




More information about the Scummvm-git-logs mailing list