[Scummvm-git-logs] scummvm master -> 13d857ee33912212235cfabb8b77fbd891ca861d

sev- noreply at scummvm.org
Tue Jun 9 17:30:02 UTC 2026


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

Summary:
7f50af3e33 DIRECTOR: Don't resize MIAW window to movie rect on load
5f9373d1d9 DIRECTOR: Fix `the stageLeft/Top/RightBottom`
13d857ee33 DIRECTOR: Don't send window events for versions below 5.0


Commit: 7f50af3e33e6c82ea7c4a704b247af0a0f291568
    https://github.com/scummvm/scummvm/commit/7f50af3e33e6c82ea7c4a704b247af0a0f291568
Author: Zachary Berry (zberry92 at gmail.com)
Date: 2026-06-09T19:29:56+02:00

Commit Message:
DIRECTOR: Don't resize MIAW window to movie rect on load

Movie::loadArchive() was calling resizeInner(_movieRect) for all windows,
overriding the size Lingo set via "set the rect of window X". When a MIAW
like a map preview is sized to 274x218 by script but the loaded movie has a
640x480 declared rect, the surface was resized to 640x480 and most of the
content appeared off-screen. Only resize non-stage windows when they are
still at the default 1x1 size (no Lingo rect has been set).

Assisted-by: Claude:claude-sonnet-4-6

Changed paths:
    engines/director/movie.cpp


diff --git a/engines/director/movie.cpp b/engines/director/movie.cpp
index d01233acc7d..5ec6b45a37a 100644
--- a/engines/director/movie.cpp
+++ b/engines/director/movie.cpp
@@ -235,11 +235,15 @@ bool Movie::loadArchive() {
 	g_director->_lastPalette = CastMemberID();
 
 	bool recenter = false;
-	// If the stage dimensions are different, delete it and start again.
-	// Otherwise, do not clear it so there can be a nice transition.
-	if (_window->getSurface()->w != _movieRect.width() || _window->getSurface()->h != _movieRect.height()) {
-		_window->resizeInner(_movieRect.width(), _movieRect.height());
-		recenter = true;
+	// For the stage, always resize to the movie rect.
+	// For MIAWs, only resize if the window hasn't been explicitly sized by Lingo
+	// (i.e. still at the 1x1 default from createWindow).
+	bool windowSizeIsDefault = (_window->getSurface()->w <= 1 && _window->getSurface()->h <= 1);
+	if (_window == _vm->getStage() || windowSizeIsDefault) {
+		if (_window->getSurface()->w != _movieRect.width() || _window->getSurface()->h != _movieRect.height()) {
+			_window->resizeInner(_movieRect.width(), _movieRect.height());
+			recenter = true;
+		}
 	}
 
 	// TODO: Add more options for desktop dimensions


Commit: 5f9373d1d9ad560a4bc733336a330eacaf6bbb45
    https://github.com/scummvm/scummvm/commit/5f9373d1d9ad560a4bc733336a330eacaf6bbb45
Author: Zachary Berry (zberry92 at gmail.com)
Date: 2026-06-09T19:29:56+02:00

Commit Message:
DIRECTOR: Fix `the stageLeft/Top/RightBottom`

Returned values relative to the current active window instead of the main
stage window.

Fixes Elroy Hits the Pavement  map preview centering. When opening the map,
preview MIAW in Elroy (Director 4), the window was being positioned incorrectly.

Changed paths:
    engines/director/lingo/lingo-the.cpp


diff --git a/engines/director/lingo/lingo-the.cpp b/engines/director/lingo/lingo-the.cpp
index 938700cde23..ad14a527e28 100644
--- a/engines/director/lingo/lingo-the.cpp
+++ b/engines/director/lingo/lingo-the.cpp
@@ -1108,32 +1108,20 @@ Datum Lingo::getTheEntity(int entity, Datum &id, int field) {
 		d = _vm->getStage();
 		break;
 	case kTheStageBottom:
-		{
-			Window *window = _vm->getCurrentWindow();
-			d = window->_window->getInnerDimensions().bottom;
-		}
+		d = _vm->getStage()->_window->getInnerDimensions().bottom;
 		break;
 	case kTheStageColor:
 		// TODO: Provide proper reverse transform for non-indexed color
 		d = (int)g_director->transformColor(g_director->getCurrentWindow()->getStageColor());
 		break;
 	case kTheStageLeft:
-		{
-			Window *window = _vm->getCurrentWindow();
-			d = window->_window->getInnerDimensions().left;
-		}
+		d = _vm->getStage()->_window->getInnerDimensions().left;
 		break;
 	case kTheStageRight:
-		{
-			Window *window = _vm->getCurrentWindow();
-			d = window->_window->getInnerDimensions().right;
-		}
+		d = _vm->getStage()->_window->getInnerDimensions().right;
 		break;
 	case kTheStageTop:
-		{
-			Window *window = _vm->getCurrentWindow();
-			d = window->_window->getInnerDimensions().top;
-		}
+		d = _vm->getStage()->_window->getInnerDimensions().top;
 		break;
 	case kTheStillDown:
 		if (Director::DT::isMouseInputIgnored()) {


Commit: 13d857ee33912212235cfabb8b77fbd891ca861d
    https://github.com/scummvm/scummvm/commit/13d857ee33912212235cfabb8b77fbd891ca861d
Author: Zachary Berry (zberry92 at gmail.com)
Date: 2026-06-09T19:29:56+02:00

Commit Message:
DIRECTOR: Don't send window events for versions below 5.0

Skip window events (like 'openWindow') for Director versions below 5.0.
In Director 4, MIAW window events did not exist. A game script uses
'on openWindow' as a manual procedural helper. By sending the openWindow
event unconditionally, ScummVM recursively triggered 'openWindow' in the
context of the preview window itself, which caused it to call 'forget' on itself
and be removed from the execution list.

Changed paths:
    engines/director/events.cpp


diff --git a/engines/director/events.cpp b/engines/director/events.cpp
index 59db793449a..cfa09d42fc3 100644
--- a/engines/director/events.cpp
+++ b/engines/director/events.cpp
@@ -436,6 +436,11 @@ bool Window::processWMEvent(Graphics::WindowClick click, Common::Event &event) {
 }
 
 void Window::sendWindowEvent(LEvent event) {
+	// Built-in window events introduced in D5.
+	// Could fire if lower-version has a similarly named event.
+	if (_vm->getVersion() < 500)
+		return;
+
 	if (_currentMovie && _window->isVisible() && !_isStage) {
 		// We cannot call processEvent here directly because it might
 		// be called from within another event processing (like 'on startMovie'	)




More information about the Scummvm-git-logs mailing list