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

sev- noreply at scummvm.org
Fri Jun 7 17:47:35 UTC 2024


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:
d1e7cfb0fc DIRECTOR: Switch Window before loading new shared cast


Commit: d1e7cfb0fccfed51c7d8b175d901bd4704f24c21
    https://github.com/scummvm/scummvm/commit/d1e7cfb0fccfed51c7d8b175d901bd4704f24c21
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2024-06-07T19:33:49+02:00

Commit Message:
DIRECTOR: Switch Window before loading new shared cast

The findPath() utility function is requesting g_director->getCurrentPath(),
and that one is calling _currentWindow->getCurrentPath(). With side-loading
of movies in different path, it was still trying loading shared cast
from the current movie directory.

Changed paths:
    engines/director/window.cpp


diff --git a/engines/director/window.cpp b/engines/director/window.cpp
index b0f021abb92..39cfd165723 100644
--- a/engines/director/window.cpp
+++ b/engines/director/window.cpp
@@ -420,6 +420,8 @@ void Window::loadNewSharedCast(Cast *previousSharedCast) {
 		g_director->_allOpenResFiles.remove(previousSharedCastPath);
 		delete previousSharedCast->_castArchive;
 		delete previousSharedCast;
+	} else {
+		debug(0, "@@   No previous shared cast");
 	}
 
 	// Load the new sharedCast
@@ -485,7 +487,9 @@ bool Window::loadNextMovie() {
 	debug(0, "@@@@   Switching to movie '%s' in '%s'", utf8ToPrintable(_currentMovie->getMacName()).c_str(), _currentPath.c_str());
 	debug(0, "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\n");
 
+	g_director->setCurrentWindow(this);
 	loadNewSharedCast(previousSharedCast);
+
 	return true;
 }
 




More information about the Scummvm-git-logs mailing list