[Scummvm-git-logs] scummvm master -> 6fff4bee6bc1214dca4adfe7050c5b4fe34154be

sev- noreply at scummvm.org
Mon May 13 10:39:32 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:
6fff4bee6b DIRECTOR: Added debug traces on movie unloading


Commit: 6fff4bee6bc1214dca4adfe7050c5b4fe34154be
    https://github.com/scummvm/scummvm/commit/6fff4bee6bc1214dca4adfe7050c5b4fe34154be
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2024-05-13T12:39:20+02:00

Commit Message:
DIRECTOR: Added debug traces on movie unloading

Changed paths:
    engines/director/movie.cpp
    engines/director/window.cpp


diff --git a/engines/director/movie.cpp b/engines/director/movie.cpp
index f6a60a57f8f..7d16b72f052 100644
--- a/engines/director/movie.cpp
+++ b/engines/director/movie.cpp
@@ -98,11 +98,16 @@ Movie::Movie(Window *window) {
 }
 
 Movie::~Movie() {
-	if (_sharedCast && _sharedCast->getArchive())
+	if (_sharedCast && _sharedCast->getArchive()) {
+		debug(0, "@@   Clearing shared cast '%s'", _sharedCast->getArchive()->getPathName().toString().c_str());
+
 		g_director->_allOpenResFiles.remove(_sharedCast->getArchive()->getPathName());
+	}
 
-	if (_cast && _cast->getArchive())
+	if (_cast && _cast->getArchive()) {
+		debug(0, "@@   Clearing movie cast '%s'", _cast->getArchive()->getPathName().toString().c_str());
 		g_director->_allOpenResFiles.remove(_cast->getArchive()->getPathName());
+	}
 
 	delete _cast;
 	delete _sharedCast;
@@ -359,6 +364,8 @@ void Movie::clearSharedCast() {
 	if (!_sharedCast)
 		return;
 
+	debug(0, "@@   Clearing shared cast '%s'", _sharedCast->getArchive()->getPathName().toString().c_str());
+
 	g_director->_allOpenResFiles.remove(_sharedCast->getArchive()->getPathName());
 
 	delete _sharedCast;
diff --git a/engines/director/window.cpp b/engines/director/window.cpp
index 96c2490043d..7d5daff6546 100644
--- a/engines/director/window.cpp
+++ b/engines/director/window.cpp
@@ -411,6 +411,8 @@ void Window::loadNewSharedCast(Cast *previousSharedCast) {
 
 	// Clean up the previous sharedCast
 	if (previousSharedCast) {
+		debug(0, "@@   Clearing shared cast '%s'", previousSharedCastPath.toString().c_str());
+
 		g_director->_allSeenResFiles.erase(previousSharedCastPath);
 		g_director->_allOpenResFiles.remove(previousSharedCastPath);
 		delete previousSharedCast->_castArchive;




More information about the Scummvm-git-logs mailing list