[Scummvm-git-logs] scummvm master -> 493b6b4858f2edd527df053abbf4d25c5da406b3
sev-
noreply at scummvm.org
Wed Jun 17 10:32:27 UTC 2026
This automated email contains information about 6 new commits which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .
Summary:
b8c8008cbb DIRECTOR: XOBJ: Add stubs for StageControl + Widget
bbf1b009b0 DIRECTOR: Properly rectify tile pixel access
32f7fe1f0c DIRECTOR: Fix RIFXArchive::writeToFile corruption
b80b0cb62c DIRECTOR: Only lock modals if the window is visible
5e41663efe DIRECTOR: XOBJ: Add XFCNs from Yellow Brick Road
493b6b4858 MACGUI: Fix keydown event processing if callback is undefined
Commit: b8c8008cbbdd7887cf795ef10a950b5f70758295
https://github.com/scummvm/scummvm/commit/b8c8008cbbdd7887cf795ef10a950b5f70758295
Author: Scott Percival (code at moral.net.au)
Date: 2026-06-17T12:32:20+02:00
Commit Message:
DIRECTOR: XOBJ: Add stubs for StageControl + Widget
Changed paths:
A engines/director/lingo/xlibs/s/stagectl.cpp
A engines/director/lingo/xlibs/s/stagectl.h
A engines/director/lingo/xlibs/w/widget.cpp
A engines/director/lingo/xlibs/w/widget.h
R engines/director/lingo/xlibs/w/widgetxobj.cpp
R engines/director/lingo/xlibs/w/widgetxobj.h
engines/director/lingo/lingo-object.cpp
engines/director/module.mk
diff --git a/engines/director/lingo/lingo-object.cpp b/engines/director/lingo/lingo-object.cpp
index b1002a6d565..17bda976d23 100644
--- a/engines/director/lingo/lingo-object.cpp
+++ b/engines/director/lingo/lingo-object.cpp
@@ -132,6 +132,7 @@
#include "director/lingo/xlibs/s/stagetc.h"
#include "director/lingo/xlibs/s/syscolor.h"
#include "director/lingo/xlibs/s/savenrestorexobj.h"
+#include "director/lingo/xlibs/s/stagectl.h"
#include "director/lingo/xlibs/t/tengu.h"
#include "director/lingo/xlibs/t/temnotaxobj.h"
#include "director/lingo/xlibs/u/unittest.h"
@@ -142,7 +143,7 @@
#include "director/lingo/xlibs/v/vmpresent.h"
#include "director/lingo/xlibs/v/volumelist.h"
#include "director/lingo/xlibs/v/voyagerxsound.h"
-#include "director/lingo/xlibs/w/widgetxobj.h"
+#include "director/lingo/xlibs/w/widget.h"
#include "director/lingo/xlibs/w/window.h"
#include "director/lingo/xlibs/w/wininfo.h"
#include "director/lingo/xlibs/w/winxobj.h"
@@ -369,6 +370,7 @@ static const struct XLibProto {
XLIBDEF(SmallUtilXObj, kXObj, 400), // D4
XLIBDEF(SoundJam, kXObj, 400), // D4
XLIBDEF(SpaceMgr, kXObj, 400), // D4
+ XLIBDEF(StageControlXObj, kXObj, 300), // D3
XLIBDEF(StageTCXObj, kXObj, 400), // D4
XLIBDEF(StayToonedBallXtra, kXtraObj, 500), // D5
XLIBDEF(StayToonedGlopXtra, kXtraObj, 500), // D5
@@ -388,8 +390,8 @@ static const struct XLibProto {
XLIBDEF(VideodiscXObj, kXObj, 200), // D2
XLIBDEF(VolumeList, kXObj, 300), // D3
XLIBDEF(VoyagerXSoundXObj, kXObj, 400), // D4
+ XLIBDEF(WidgetXObj, kXObj, 300), // D3
XLIBDEF(WinInfoXObj, kXObj, 400), // D4
- XLIBDEF(WidgetXObj, kXObj, 400), // D4
XLIBDEF(WindowXObj, kXObj, 200), // D2
XLIBDEF(XCMDGlueXObj, kXObj, 200), // D2
XLIBDEF(XPlayPACoXFCN, kXObj, 300), // D3
diff --git a/engines/director/lingo/xlibs/s/stagectl.cpp b/engines/director/lingo/xlibs/s/stagectl.cpp
new file mode 100644
index 00000000000..5090a16aa1b
--- /dev/null
+++ b/engines/director/lingo/xlibs/s/stagectl.cpp
@@ -0,0 +1,107 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "common/system.h"
+
+#include "director/director.h"
+#include "director/lingo/lingo.h"
+#include "director/lingo/lingo-object.h"
+#include "director/lingo/lingo-utils.h"
+#include "director/lingo/xlibs/s/stagectl.h"
+
+/**************************************************
+ *
+ * USED IN:
+ * Yellow Brick Road
+ *
+ **************************************************/
+
+/*
+-- Category Misc.
+Title Stage Control External Factory
+(C)COPYRIGHT IBM CORP. 1993 $Revision
+--StageControl
+I mNew --Creates a new instance of the XObject
+X mDispose --Disposes of XObject instance
+S mName --Returns the XObject name
+II mNoisy --Sets noisy flag of the receiver, and returns previous value
+I mNumberOfInstances --Returns Number of Module Instances
+X mBecomeSystemModal --StageWindow becomes System Modal
+ */
+
+namespace Director {
+
+const char *StageControlXObj::xlibName = "StageControl";
+const XlibFileDesc StageControlXObj::fileNames[] = {
+ { "STAGECTL", nullptr },
+ { nullptr, nullptr },
+};
+
+static MethodProto xlibMethods[] = {
+ { "new", StageControlXObj::m_new, 0, 0, 300 },
+ { "dispose", StageControlXObj::m_dispose, 0, 0, 300 },
+ { "name", StageControlXObj::m_name, 0, 0, 300 },
+ { "noisy", StageControlXObj::m_noisy, 1, 1, 300 },
+ { "numberOfInstances", StageControlXObj::m_numberOfInstances, 0, 0, 300 },
+ { "becomeSystemModal", StageControlXObj::m_becomeSystemModal, 0, 0, 300 },
+
+ { nullptr, nullptr, 0, 0, 0 }
+};
+
+static BuiltinProto xlibBuiltins[] = {
+
+ { nullptr, nullptr, 0, 0, 0, VOIDSYM }
+};
+
+StageControlXObject::StageControlXObject(ObjectType ObjectType) :Object<StageControlXObject>("StageControl") {
+ _objType = ObjectType;
+}
+
+void StageControlXObj::open(ObjectType type, const Common::Path &path) {
+ StageControlXObject::initMethods(xlibMethods);
+ StageControlXObject *xobj = new StageControlXObject(type);
+ if (type == kXtraObj) {
+ g_lingo->_openXtras.push_back(xlibName);
+ g_lingo->_openXtraObjects.push_back(xobj);
+ }
+ g_lingo->exposeXObject(xlibName, xobj);
+ g_lingo->initBuiltIns(xlibBuiltins);
+}
+
+void StageControlXObj::close(ObjectType type) {
+ StageControlXObject::cleanupMethods();
+ g_lingo->_globalvars[xlibName] = Datum();
+
+}
+
+void StageControlXObj::m_new(int nargs) {
+ g_lingo->printSTUBWithArglist("StageControlXObj::m_new", nargs);
+ g_lingo->dropStack(nargs);
+ g_lingo->push(g_lingo->_state->me);
+}
+
+XOBJSTUBNR(StageControlXObj::m_dispose)
+XOBJSTUB(StageControlXObj::m_name, "")
+XOBJSTUB(StageControlXObj::m_noisy, 0)
+XOBJSTUB(StageControlXObj::m_numberOfInstances, 0)
+XOBJSTUBNR(StageControlXObj::m_becomeSystemModal)
+
+}
diff --git a/engines/director/lingo/xlibs/w/widgetxobj.h b/engines/director/lingo/xlibs/s/stagectl.h
similarity index 73%
rename from engines/director/lingo/xlibs/w/widgetxobj.h
rename to engines/director/lingo/xlibs/s/stagectl.h
index 411e4074655..2d914970ac5 100644
--- a/engines/director/lingo/xlibs/w/widgetxobj.h
+++ b/engines/director/lingo/xlibs/s/stagectl.h
@@ -19,19 +19,19 @@
*
*/
-#ifndef DIRECTOR_LINGO_XLIBS_WIDGETXOBJ_H
-#define DIRECTOR_LINGO_XLIBS_WIDGETXOBJ_H
+#ifndef DIRECTOR_LINGO_XLIBS_S_STAGECTL_H
+#define DIRECTOR_LINGO_XLIBS_S_STAGECTL_H
namespace Director {
-class WidgetXObject : public Object<WidgetXObject> {
+class StageControlXObject : public Object<StageControlXObject> {
public:
- WidgetXObject(ObjectType objType);
+ StageControlXObject(ObjectType objType);
};
-namespace WidgetXObj {
+namespace StageControlXObj {
-extern const char *const xlibName;
+extern const char *xlibName;
extern const XlibFileDesc fileNames[];
void open(ObjectType type, const Common::Path &path);
@@ -39,10 +39,12 @@ void close(ObjectType type);
void m_new(int nargs);
void m_dispose(int nargs);
-void m_getPro(int nargs);
-void m_askQuit(int nargs);
+void m_name(int nargs);
+void m_noisy(int nargs);
+void m_numberOfInstances(int nargs);
+void m_becomeSystemModal(int nargs);
-} // End of namespace WidgetXObj
+} // End of namespace StageControlXObj
} // End of namespace Director
diff --git a/engines/director/lingo/xlibs/w/widget.cpp b/engines/director/lingo/xlibs/w/widget.cpp
new file mode 100644
index 00000000000..9120893b146
--- /dev/null
+++ b/engines/director/lingo/xlibs/w/widget.cpp
@@ -0,0 +1,157 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "common/system.h"
+
+#include "director/director.h"
+#include "director/lingo/lingo.h"
+#include "director/lingo/lingo-object.h"
+#include "director/lingo/lingo-utils.h"
+#include "director/lingo/xlibs/w/widget.h"
+
+/**************************************************
+ *
+ * USED IN:
+ * [insert game here]
+ *
+ **************************************************/
+
+/*
+-- Widget External Factory. 16Feb93 PTM
+--Widget
+IS mNew, FileName --Creates a new instance of the XObject
+X mDispose --Disposes of XObject instance
+S mName --Returns the XObject name (Widget)
+I mStatus --Returns an integer status code
+SI mError, code --Returns an error string
+S mLastError --Returns last error string
+III mAdd, arg1, arg2 --Returns arg1+arg2
+I mAskQuit --Returns an integer status code
+SSI mFirst, str, nchars --Return the first nchars of string str
+ISI mLipSync, str, nchars --Return the first nchars of string str
+I mLoadData --Returns an integer status code
+II mSaveData place --Returns an integer status code
+I mHideCursor --Returns Status
+I mShowCursor --Returns Status
+V mMul, f1, f2 --Returns f1*f2 as floating point
+X mGlobals --Sample code to Read & Modify globals
+X mSymbols --Sample code to work with Symbols
+X mSendPerform --Sample code to show SendPerform call
+X mFactory --Sample code to find Factory objects
+ */
+
+namespace Director {
+
+const char *WidgetXObj::xlibName = "Widget";
+const XlibFileDesc WidgetXObj::fileNames[] = {
+ { "Widget", nullptr },
+ { nullptr, nullptr },
+};
+
+static MethodProto xlibMethods[] = {
+ { "new", WidgetXObj::m_new, 1, 1, 300 },
+ { "dispose", WidgetXObj::m_dispose, 0, 0, 300 },
+ // Yellow Brick Road
+ { "name", WidgetXObj::m_name, 0, 0, 300 },
+ { "status", WidgetXObj::m_status, 0, 0, 300 },
+ { "error", WidgetXObj::m_error, 1, 1, 300 },
+ { "lastError", WidgetXObj::m_lastError, 0, 0, 300 },
+ { "add", WidgetXObj::m_add, 2, 2, 300 },
+ { "askQuit", WidgetXObj::m_askQuit, 0, 0, 300 },
+ { "first", WidgetXObj::m_first, 2, 2, 300 },
+ { "lipSync", WidgetXObj::m_lipSync, 2, 2, 300 },
+ { "loadData", WidgetXObj::m_loadData, 0, 0, 300 },
+ { "saveData", WidgetXObj::m_saveData, 1, 1, 300 },
+ { "hideCursor", WidgetXObj::m_hideCursor, 0, 0, 300 },
+ { "showCursor", WidgetXObj::m_showCursor, 0, 0, 300 },
+ { "mul", WidgetXObj::m_mul, 0, 0, 300 },
+ { "globals", WidgetXObj::m_globals, 0, 0, 300 },
+ { "symbols", WidgetXObj::m_symbols, 0, 0, 300 },
+ { "sendPerform", WidgetXObj::m_sendPerform, 0, 0, 300 },
+ { "factory", WidgetXObj::m_factory, 0, 0, 300 },
+ // Alice
+ { "GetPro", WidgetXObj::m_getPro, 0, 0, 300 }, // D4
+
+ { nullptr, nullptr, 0, 0, 0 }
+};
+
+static BuiltinProto xlibBuiltins[] = {
+
+ { nullptr, nullptr, 0, 0, 0, VOIDSYM }
+};
+
+WidgetXObject::WidgetXObject(ObjectType ObjectType) :Object<WidgetXObject>("Widget") {
+ _objType = ObjectType;
+}
+
+void WidgetXObj::open(ObjectType type, const Common::Path &path) {
+ WidgetXObject::initMethods(xlibMethods);
+ WidgetXObject *xobj = new WidgetXObject(type);
+ if (type == kXtraObj) {
+ g_lingo->_openXtras.push_back(xlibName);
+ g_lingo->_openXtraObjects.push_back(xobj);
+ }
+ g_lingo->exposeXObject(xlibName, xobj);
+ g_lingo->initBuiltIns(xlibBuiltins);
+}
+
+void WidgetXObj::close(ObjectType type) {
+ WidgetXObject::cleanupMethods();
+ g_lingo->_globalvars[xlibName] = Datum();
+
+}
+
+void WidgetXObj::m_new(int nargs) {
+ g_lingo->printSTUBWithArglist("WidgetXObj::m_new", nargs);
+ g_lingo->dropStack(nargs);
+ g_lingo->push(g_lingo->_state->me);
+}
+
+
+XOBJSTUBNR(WidgetXObj::m_dispose)
+XOBJSTUB(WidgetXObj::m_name, "")
+XOBJSTUB(WidgetXObj::m_status, 0)
+XOBJSTUB(WidgetXObj::m_error, "")
+XOBJSTUB(WidgetXObj::m_lastError, "")
+XOBJSTUB(WidgetXObj::m_add, 0)
+XOBJSTUB(WidgetXObj::m_askQuit, 0)
+XOBJSTUB(WidgetXObj::m_first, "")
+
+// 100 means the animation is done
+XOBJSTUB(WidgetXObj::m_lipSync, 100)
+
+XOBJSTUB(WidgetXObj::m_loadData, 0)
+XOBJSTUB(WidgetXObj::m_saveData, 0)
+XOBJSTUB(WidgetXObj::m_hideCursor, 0)
+XOBJSTUB(WidgetXObj::m_showCursor, 0)
+XOBJSTUB(WidgetXObj::m_mul, 0)
+XOBJSTUBNR(WidgetXObj::m_globals)
+XOBJSTUBNR(WidgetXObj::m_symbols)
+XOBJSTUBNR(WidgetXObj::m_sendPerform)
+XOBJSTUBNR(WidgetXObj::m_factory)
+
+void WidgetXObj::m_getPro(int nargs) {
+ // seems to want a disk drive letter
+ g_lingo->push(Datum("D"));
+}
+
+
+}
diff --git a/engines/director/lingo/xlibs/w/widget.h b/engines/director/lingo/xlibs/w/widget.h
new file mode 100644
index 00000000000..4d7af06e124
--- /dev/null
+++ b/engines/director/lingo/xlibs/w/widget.h
@@ -0,0 +1,66 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef DIRECTOR_LINGO_XLIBS_W_WIDGET_H
+#define DIRECTOR_LINGO_XLIBS_W_WIDGET_H
+
+namespace Director {
+
+class WidgetXObject : public Object<WidgetXObject> {
+public:
+ WidgetXObject(ObjectType objType);
+};
+
+namespace WidgetXObj {
+
+extern const char *xlibName;
+extern const XlibFileDesc fileNames[];
+
+void open(ObjectType type, const Common::Path &path);
+void close(ObjectType type);
+
+void m_new(int nargs);
+void m_dispose(int nargs);
+void m_name(int nargs);
+void m_status(int nargs);
+void m_error(int nargs);
+void m_lastError(int nargs);
+void m_add(int nargs);
+void m_askQuit(int nargs);
+void m_first(int nargs);
+void m_lipSync(int nargs);
+void m_loadData(int nargs);
+void m_saveData(int nargs);
+void m_hideCursor(int nargs);
+void m_showCursor(int nargs);
+void m_mul(int nargs);
+void m_globals(int nargs);
+void m_symbols(int nargs);
+void m_sendPerform(int nargs);
+void m_factory(int nargs);
+
+void m_getPro(int nargs);
+
+} // End of namespace WidgetXObj
+
+} // End of namespace Director
+
+#endif
diff --git a/engines/director/lingo/xlibs/w/widgetxobj.cpp b/engines/director/lingo/xlibs/w/widgetxobj.cpp
deleted file mode 100644
index d22b60fb761..00000000000
--- a/engines/director/lingo/xlibs/w/widgetxobj.cpp
+++ /dev/null
@@ -1,97 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-
-/*************************************
- *
- * USED IN:
- * Alice: An Interactive Museum
- *
- *************************************/
-
-/*
- * Widget External Factory
- *
- * Widget
- * I mNew --Creates a new instance of the XObject
- * X mDispose --Disposes of XObject instance
- * S mGetPro --
- * I mAskQuit --
- */
-
-#include "director/director.h"
-#include "director/lingo/lingo.h"
-#include "director/lingo/lingo-object.h"
-#include "director/lingo/lingo-utils.h"
-#include "director/lingo/xlibs/w/widgetxobj.h"
-
-namespace Director {
-
-
-const char *const WidgetXObj::xlibName = "Widget";
-const XlibFileDesc WidgetXObj::fileNames[] = {
- { "widget", nullptr },
- { nullptr, nullptr },
-};
-
-static const MethodProto xlibMethods[] = {
- { "new", WidgetXObj::m_new, 0, 0, 400 }, // D4
- { "Dispose", WidgetXObj::m_dispose, 0, 0, 400 }, // D4
- { "GetPro", WidgetXObj::m_getPro, 0, 0, 400 }, // D4
- { "AskQuit", WidgetXObj::m_askQuit, 0, 0, 400 }, // D4
- { nullptr, nullptr, 0, 0, 0 }
-};
-
-void WidgetXObj::open(ObjectType type, const Common::Path &path) {
- if (type == kXObj) {
- WidgetXObject::initMethods(xlibMethods);
- WidgetXObject *xobj = new WidgetXObject(kXObj);
- g_lingo->exposeXObject(xlibName, xobj);
- }
-}
-
-void WidgetXObj::close(ObjectType type) {
- if (type == kXObj) {
- WidgetXObject::cleanupMethods();
- g_lingo->_globalvars[xlibName] = Datum();
- }
-}
-
-WidgetXObject::WidgetXObject(ObjectType ObjectType) :Object<WidgetXObject>("Widget") {
- _objType = ObjectType;
-}
-
-void WidgetXObj::m_new(int nargs) {
- g_lingo->push(g_lingo->_state->me);
-}
-
-void WidgetXObj::m_dispose(int nargs) {
- g_lingo->printSTUBWithArglist("WidgetXObj::m_dispose", nargs);
- g_lingo->dropStack(nargs);
-}
-
-void WidgetXObj::m_getPro(int nargs) {
- // seems to want a disk drive letter
- g_lingo->push(Datum("D"));
-}
-
-XOBJSTUB(WidgetXObj::m_askQuit, 0)
-
-} // End of namespace Director
diff --git a/engines/director/module.mk b/engines/director/module.mk
index 0b12b8920b5..de2681f1340 100644
--- a/engines/director/module.mk
+++ b/engines/director/module.mk
@@ -138,6 +138,7 @@ MODULE_OBJS = \
lingo/xlibs/m/myfolder.o \
lingo/xlibs/g/getuinfo.o \
lingo/xlibs/o/openbleedwindowxcmd.o \
+ lingo/xlibs/s/stagectl.o \
lingo/xlibs/p/playsoundmoviexobj.o \
lingo/xlibs/s/savenrestorexobj.o \
lingo/xlibs/t/temnotaxobj.o \
@@ -174,7 +175,7 @@ MODULE_OBJS = \
lingo/xlibs/v/vmpresent.o \
lingo/xlibs/v/volumelist.o \
lingo/xlibs/v/voyagerxsound.o \
- lingo/xlibs/w/widgetxobj.o \
+ lingo/xlibs/w/widget.o \
lingo/xlibs/w/window.o \
lingo/xlibs/w/winxobj.o \
lingo/xlibs/w/wininfo.o \
Commit: bbf1b009b00c37b7681e69df71844e33073a7a45
https://github.com/scummvm/scummvm/commit/bbf1b009b00c37b7681e69df71844e33073a7a45
Author: Scott Percival (code at moral.net.au)
Date: 2026-06-17T12:32:20+02:00
Commit Message:
DIRECTOR: Properly rectify tile pixel access
Fixes out of bounds memory access when starting Yellow Brick Road.
Changed paths:
engines/director/director.h
engines/director/graphics.cpp
diff --git a/engines/director/director.h b/engines/director/director.h
index 9b506c8bd43..eab89866cd8 100644
--- a/engines/director/director.h
+++ b/engines/director/director.h
@@ -396,7 +396,8 @@ struct DirectorPlotData {
DirectorPlotData &operator=(const DirectorPlotData &);
~DirectorPlotData() {
- delete ms;
+ if (ms)
+ delete ms;
}
};
diff --git a/engines/director/graphics.cpp b/engines/director/graphics.cpp
index 0230c54b70a..a1cf07d0c92 100644
--- a/engines/director/graphics.cpp
+++ b/engines/director/graphics.cpp
@@ -334,8 +334,12 @@ void InkPrimitives<T>::drawPoint(int x, int y, uint32 src, void *data) {
}
if (p->ms->tile) {
- int x1 = p->ms->tileRect->left + (p->ms->pd->fillOriginX + x) % p->ms->tileRect->width();
- int y1 = p->ms->tileRect->top + (p->ms->pd->fillOriginY + y) % p->ms->tileRect->height();
+ int x1 = (p->ms->tileRect->left + p->ms->pd->fillOriginX + x) % p->ms->tileRect->width();
+ if (x1 < 0)
+ x1 += p->ms->tileRect->width();
+ int y1 = (p->ms->tileRect->top + p->ms->pd->fillOriginY + y) % p->ms->tileRect->height();
+ if (y1 < 0)
+ y1 += p->ms->tileRect->height();
src = p->ms->tile->_surface.getPixel(x1, y1);
} else {
Commit: 32f7fe1f0c738b0b385a77ab4e72826a52e267ec
https://github.com/scummvm/scummvm/commit/32f7fe1f0c738b0b385a77ab4e72826a52e267ec
Author: Scott Percival (code at moral.net.au)
Date: 2026-06-17T12:32:20+02:00
Commit Message:
DIRECTOR: Fix RIFXArchive::writeToFile corruption
Previously, opening a movie from the save file storage would use a
FSNode for providing data from the archive. In the event of writing the
movie to the same path, one of the first steps would be to create a
Common::OutSaveFile which would break the existing FSNode, and
subsequently every Archive::getResource call would return
nothing/garbage. This was fixed by buffering movie data from the save path
with a Common::MemoryReadStream.
Fixes saving in Opera Fatal's unhinged save game system.
Changed paths:
engines/director/archive-save.cpp
engines/director/archive.h
engines/director/lingo/xlibs/f/fileio.cpp
diff --git a/engines/director/archive-save.cpp b/engines/director/archive-save.cpp
index 4113f072204..1e2fbd43db9 100644
--- a/engines/director/archive-save.cpp
+++ b/engines/director/archive-save.cpp
@@ -189,6 +189,8 @@ bool RIFXArchive::writeToFile(Common::String filename, Movie *movie) {
} else {
warning("RIFXArchive::writeStream: Error saving the file %s", saveFileName.c_str());
}
+ // Add to search index
+ ((SavedArchive *)SearchMan.getArchive(kSavedFilesArchive))->_addFile(saveFileName);
delete saveFile;
for (auto it : builtResources) {
@@ -691,17 +693,13 @@ uint32 RIFXArchive::findParentIndex(uint32 tag, uint16 index) {
return 0;
}
-SavedArchive::SavedArchive(Common::String target) {
+SavedArchive::SavedArchive(const Common::String &target) {
+ _target = target;
Common::StringArray saveFileList = g_engine->getSaveFileManager()->listSavefiles(target + "-*");
debugC(3, kDebugLoading, "DirectorEngine:: loadSaveFiles: Loading save files");
- for (auto saveFileName : saveFileList) {
- // Derive the original file name from the save file name
- // Save files are named target_name-save_filename
- Common::String origFileName = saveFileName.substr(target.size() + 1);
- debugC(3, kDebugLoading, "Found save file: %s -> %s", saveFileName.c_str(), origFileName.c_str());
-
- _files[origFileName] = saveFileName;
+ for (auto &saveFileName : saveFileList) {
+ _addFile(saveFileName);
}
}
@@ -732,7 +730,33 @@ Common::SeekableReadStream *SavedArchive::createReadStreamForMember(const Common
if (fDesc == _files.end())
return nullptr;
- return g_engine->getSaveFileManager()->openForLoading(fDesc->_value);
+ // Buffer the save file data into memory.
+ // We have to do this because openForLoading will return a stream backed by a
+ // FSNode, and subsequently calling openForSaving on the same file will cause
+ // that stream to become completely empty. RIFXArchive::writeToFile needs to
+ // be able to read from that stream while saving!
+ Common::SeekableReadStream *stream = g_engine->getSaveFileManager()->openForLoading(fDesc->_value);
+ if (!stream)
+ return nullptr;
+
+ byte *data = (byte *)calloc(stream->size(), sizeof(byte));
+ stream->read(data, stream->size());
+ Common::MemoryReadStream *result = new Common::MemoryReadStream(data, stream->size(), DisposeAfterUse::YES);
+ delete stream;
+ return result;
+}
+
+bool SavedArchive::_addFile(const Common::String &fileName) {
+ // Derive the original file name from the save file name
+ // Save files are named target_name-save_filename
+ Common::String origFileName = fileName.substr(_target.size() + 1);
+ if (!_files.contains(origFileName)) {
+ debugC(3, kDebugLoading, "Found save file: %s -> %s", fileName.c_str(), fileName.c_str());
+
+ _files[origFileName] = fileName;
+ return true;
+ }
+ return false;
}
} // End of namespace Director
diff --git a/engines/director/archive.h b/engines/director/archive.h
index 071c4fa8d44..e7c6c177528 100644
--- a/engines/director/archive.h
+++ b/engines/director/archive.h
@@ -276,15 +276,18 @@ void dumpFile(Common::String filename, uint32 id, uint32 tag, byte *dumpData, ui
class SavedArchive : public Common::Archive {
public:
- SavedArchive(Common::String target) ;
+ SavedArchive(const Common::String &target);
bool hasFile(const Common::Path &path) const override;
int listMembers(Common::ArchiveMemberList &list) const override;
const Common::ArchiveMemberPtr getMember(const Common::Path &path) const override;
Common::SeekableReadStream *createReadStreamForMember(const Common::Path &path) const override;
+ bool _addFile(const Common::String &path);
+
private:
typedef Common::HashMap<Common::String, Common::String, Common::IgnoreCase_Hash, Common::IgnoreCase_EqualTo> FileMap;
FileMap _files;
+ Common::String _target;
};
}
diff --git a/engines/director/lingo/xlibs/f/fileio.cpp b/engines/director/lingo/xlibs/f/fileio.cpp
index aa612552184..76a2cccf891 100644
--- a/engines/director/lingo/xlibs/f/fileio.cpp
+++ b/engines/director/lingo/xlibs/f/fileio.cpp
@@ -128,6 +128,7 @@ delete object me -- deletes the open file
#include "image/pict.h"
#include "director/director.h"
+#include "director/archive.h"
#include "director/picture.h"
#include "director/types.h"
#include "director/util.h"
@@ -323,6 +324,8 @@ void FileObject::clear() {
Common::OutSaveFile *outFile = saves->openForSaving(*_filename, false);
outFile->write(_outStream->getData(), _outStream->size());
outFile->finalize();
+ // Add to search index
+ ((SavedArchive *)SearchMan.getArchive(kSavedFilesArchive))->_addFile(*_filename);
delete outFile;
}
delete _outStream;
Commit: b80b0cb62cea527a325ccd7d1125b649b6170443
https://github.com/scummvm/scummvm/commit/b80b0cb62cea527a325ccd7d1125b649b6170443
Author: Scott Percival (code at moral.net.au)
Date: 2026-06-17T12:32:20+02:00
Commit Message:
DIRECTOR: Only lock modals if the window is visible
Fixes screen locking up in Opera Fatal's unhinged save game system.
Changed paths:
engines/director/window.cpp
diff --git a/engines/director/window.cpp b/engines/director/window.cpp
index 63d92adc3e2..a253a7cceb7 100644
--- a/engines/director/window.cpp
+++ b/engines/director/window.cpp
@@ -406,7 +406,8 @@ void Window::setModal(bool modal) {
_wm->setLockedWidget(nullptr);
_isModal = false;
} else if (!_isModal && modal) {
- _wm->setLockedWidget(this->_window);
+ if (_window->isVisible())
+ _wm->setLockedWidget(this->_window);
_isModal = true;
}
}
Commit: 5e41663efed8f807375f5cc4b0b33c1a1e292275
https://github.com/scummvm/scummvm/commit/5e41663efed8f807375f5cc4b0b33c1a1e292275
Author: Scott Percival (code at moral.net.au)
Date: 2026-06-17T12:32:20+02:00
Commit Message:
DIRECTOR: XOBJ: Add XFCNs from Yellow Brick Road
Changed paths:
A engines/director/lingo/xlibs/f/flushmousexfcn.cpp
A engines/director/lingo/xlibs/f/flushmousexfcn.h
A engines/director/lingo/xlibs/g/getsoundxfcn.cpp
A engines/director/lingo/xlibs/g/getsoundxfcn.h
engines/director/lingo/lingo-object.cpp
engines/director/lingo/xlibs/w/widget.cpp
engines/director/lingo/xlibs/w/winxobj.cpp
engines/director/module.mk
diff --git a/engines/director/lingo/lingo-object.cpp b/engines/director/lingo/lingo-object.cpp
index 17bda976d23..4355af923f4 100644
--- a/engines/director/lingo/lingo-object.cpp
+++ b/engines/director/lingo/lingo-object.cpp
@@ -72,12 +72,14 @@
#include "director/lingo/xlibs/f/flushxobj.h"
#include "director/lingo/xlibs/f/fplayxobj.h"
#include "director/lingo/xlibs/f/fsutil.h"
+#include "director/lingo/xlibs/f/flushmousexfcn.h"
#include "director/lingo/xlibs/g/genutils.h"
#include "director/lingo/xlibs/g/getscreenrectsxfcn.h"
#include "director/lingo/xlibs/g/getscreensizexfcn.h"
#include "director/lingo/xlibs/g/getsoundinlevel.h"
#include "director/lingo/xlibs/g/gpid.h"
#include "director/lingo/xlibs/g/getuinfo.h"
+#include "director/lingo/xlibs/g/getsoundxfcn.h"
#include "director/lingo/xlibs/h/henry.h"
#include "director/lingo/xlibs/h/hitmap.h"
#include "director/lingo/xlibs/i/inixobj.h"
@@ -298,6 +300,7 @@ static const struct XLibProto {
XLIBDEF(FindSys, kXObj, 400), // D4
XLIBDEF(FindWin, kXObj, 400), // D4
XLIBDEF(FinderEventsXCMD, kXObj, 400), // D4
+ XLIBDEF(FlushMouseXFCN, kXObj, 300), // D3
XLIBDEF(FlushXObj, kXObj, 300), // D3
XLIBDEF(FPlayXObj, kXObj, 200), // D2
XLIBDEF(GenUtilsXObj, kXObj, 400), // D4
@@ -305,6 +308,7 @@ static const struct XLibProto {
XLIBDEF(GetScreenRectsXFCN, kXObj, 300), // D3
XLIBDEF(GetScreenSizeXFCN, kXObj, 300), // D3
XLIBDEF(GetSoundInLevelXObj,kXObj, 400), // D4
+ XLIBDEF(GetSoundXFCN, kXObj, 300), // D3
XLIBDEF(GetUInfoXObj, kXObj, 400), // D4
XLIBDEF(GpidXObj, kXObj, 400), // D4
XLIBDEF(HenryXObj, kXObj, 400), // D4
@@ -358,7 +362,7 @@ static const struct XLibProto {
XLIBDEF(QTVR, kXObj, 400), // D4
XLIBDEF(QtvrxtraXtra, kXtraObj, 500), // D5
XLIBDEF(Quicktime, kXObj, 300), // D3
- XLIBDEF(RearWindowXObj, kXObj, 400), // D4
+ XLIBDEF(RearWindowXObj, kXObj, 300), // D3
XLIBDEF(RegisterComponent, kXObj, 400), // D4
XLIBDEF(RegistryReaderXtra, kXtraObj, 500), // D5
XLIBDEF(RemixXCMD, kXObj, 300), // D3
diff --git a/engines/director/lingo/xlibs/f/flushmousexfcn.cpp b/engines/director/lingo/xlibs/f/flushmousexfcn.cpp
new file mode 100644
index 00000000000..47d4c867a67
--- /dev/null
+++ b/engines/director/lingo/xlibs/f/flushmousexfcn.cpp
@@ -0,0 +1,60 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "common/system.h"
+
+#include "director/director.h"
+#include "director/lingo/lingo.h"
+#include "director/lingo/lingo-object.h"
+#include "director/lingo/lingo-utils.h"
+#include "director/lingo/xlibs/f/flushmousexfcn.h"
+
+/**************************************************
+ *
+ * USED IN:
+ * Yellow Brick Road
+ *
+ **************************************************/
+
+namespace Director {
+
+const char *FlushMouseXFCN::xlibName = "FlushMouse";
+const XlibFileDesc FlushMouseXFCN::fileNames[] = {
+ { "FlushMouse", nullptr },
+ { nullptr, nullptr }
+};
+
+static BuiltinProto builtins[] = {
+ { "FlushMouse", FlushMouseXFCN::m_FlushMouse, -1, 0, 300, HBLTIN },
+ { nullptr, nullptr, 0, 0, 0, VOIDSYM }
+};
+
+void FlushMouseXFCN::open(ObjectType type, const Common::Path &path) {
+ g_lingo->initBuiltIns(builtins);
+}
+
+void FlushMouseXFCN::close(ObjectType type) {
+ g_lingo->cleanupBuiltIns(builtins);
+}
+
+XOBJSTUB(FlushMouseXFCN::m_FlushMouse, 0)
+
+}
diff --git a/engines/director/lingo/xlibs/f/flushmousexfcn.h b/engines/director/lingo/xlibs/f/flushmousexfcn.h
new file mode 100644
index 00000000000..a1bf97fa48d
--- /dev/null
+++ b/engines/director/lingo/xlibs/f/flushmousexfcn.h
@@ -0,0 +1,41 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef DIRECTOR_LINGO_XLIBS_F_FLUSHMOUSEXFCN_H
+#define DIRECTOR_LINGO_XLIBS_F_FLUSHMOUSEXFCN_H
+
+namespace Director {
+
+namespace FlushMouseXFCN {
+
+extern const char *xlibName;
+extern const XlibFileDesc fileNames[];
+
+void open(ObjectType type, const Common::Path &path);
+void close(ObjectType type);
+
+void m_FlushMouse(int nargs);
+
+} // End of namespace FlushMouseXFCN
+
+} // End of namespace Director
+
+#endif
diff --git a/engines/director/lingo/xlibs/g/getsoundxfcn.cpp b/engines/director/lingo/xlibs/g/getsoundxfcn.cpp
new file mode 100644
index 00000000000..609313e795a
--- /dev/null
+++ b/engines/director/lingo/xlibs/g/getsoundxfcn.cpp
@@ -0,0 +1,60 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "common/system.h"
+
+#include "director/director.h"
+#include "director/lingo/lingo.h"
+#include "director/lingo/lingo-object.h"
+#include "director/lingo/lingo-utils.h"
+#include "director/lingo/xlibs/g/getsoundxfcn.h"
+
+/**************************************************
+ *
+ * USED IN:
+ * Yellow Brick Road
+ *
+ **************************************************/
+
+namespace Director {
+
+const char *GetSoundXFCN::xlibName = "GetSound";
+const XlibFileDesc GetSoundXFCN::fileNames[] = {
+ { "getsound", nullptr },
+ { nullptr, nullptr }
+};
+
+static BuiltinProto builtins[] = {
+ { "GetSound", GetSoundXFCN::m_GetSound, -1, 0, 300, HBLTIN },
+ { nullptr, nullptr, 0, 0, 0, VOIDSYM }
+};
+
+void GetSoundXFCN::open(ObjectType type, const Common::Path &path) {
+ g_lingo->initBuiltIns(builtins);
+}
+
+void GetSoundXFCN::close(ObjectType type) {
+ g_lingo->cleanupBuiltIns(builtins);
+}
+
+XOBJSTUB(GetSoundXFCN::m_GetSound, 0)
+
+}
diff --git a/engines/director/lingo/xlibs/g/getsoundxfcn.h b/engines/director/lingo/xlibs/g/getsoundxfcn.h
new file mode 100644
index 00000000000..d541aa77755
--- /dev/null
+++ b/engines/director/lingo/xlibs/g/getsoundxfcn.h
@@ -0,0 +1,41 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef DIRECTOR_LINGO_XLIBS_G_GETSOUNDXFCN_H
+#define DIRECTOR_LINGO_XLIBS_G_GETSOUNDXFCN_H
+
+namespace Director {
+
+namespace GetSoundXFCN {
+
+extern const char *xlibName;
+extern const XlibFileDesc fileNames[];
+
+void open(ObjectType type, const Common::Path &path);
+void close(ObjectType type);
+
+void m_GetSound(int nargs);
+
+} // End of namespace GetSoundXFCN
+
+} // End of namespace Director
+
+#endif
diff --git a/engines/director/lingo/xlibs/w/widget.cpp b/engines/director/lingo/xlibs/w/widget.cpp
index 9120893b146..ee5941d5a3a 100644
--- a/engines/director/lingo/xlibs/w/widget.cpp
+++ b/engines/director/lingo/xlibs/w/widget.cpp
@@ -30,7 +30,8 @@
/**************************************************
*
* USED IN:
- * [insert game here]
+ * Alice: An Interactive Museum
+ * Yellow Brick Road
*
**************************************************/
diff --git a/engines/director/lingo/xlibs/w/winxobj.cpp b/engines/director/lingo/xlibs/w/winxobj.cpp
index 4ea1156b598..3d3ba005ded 100644
--- a/engines/director/lingo/xlibs/w/winxobj.cpp
+++ b/engines/director/lingo/xlibs/w/winxobj.cpp
@@ -23,6 +23,7 @@
*
* USED IN:
* Alice: An Interactive Museum
+ * Yellow Brick Road
*
*************************************/
@@ -233,16 +234,16 @@ X mDispose -- closes the RearWindow, releases its data, and the XObject itself f
*/
static const MethodProto xlibMethods[] = {
- { "new", RearWindowXObj::m_new, 1, 1, 400 }, // D4
- { "getappname", RearWindowXObj::m_getAppName, 0, 0, 400 }, // D4
- { "GetMemoryNeeded", RearWindowXObj::m_getMemoryNeeded, 0, 0, 400 }, // D4
- { "GetScreenBottom", RearWindowXObj::m_getScreenBottom, 0, 0, 400 }, // D4
- { "GetScreenLeft", RearWindowXObj::m_getScreenLeft, 0, 0, 400 }, // D4
- { "GetScreenRight", RearWindowXObj::m_getScreenRight, 0, 0, 400 }, // D4
- { "GetScreenTop", RearWindowXObj::m_getScreenTop, 0, 0, 400 }, // D4
- { "IndexColorToWindow", RearWindowXObj::m_indexColorToWindow, 1, 1, 400 }, // D4
- { "PatToWindow", RearWindowXObj::m_patToWindow, 1, 1, 400 }, // D4
- { "RGBColorToWindow", RearWindowXObj::m_rgbColorToWindow, 3, 3, 400 }, // D4
+ { "new", RearWindowXObj::m_new, 1, 1, 300 }, // D3
+ { "getappname", RearWindowXObj::m_getAppName, 0, 0, 300 }, // D3
+ { "GetMemoryNeeded", RearWindowXObj::m_getMemoryNeeded, 0, 0, 300 }, // D3
+ { "GetScreenBottom", RearWindowXObj::m_getScreenBottom, 0, 0, 300 }, // D3
+ { "GetScreenLeft", RearWindowXObj::m_getScreenLeft, 0, 0, 300 }, // D3
+ { "GetScreenRight", RearWindowXObj::m_getScreenRight, 0, 0, 300 }, // D3
+ { "GetScreenTop", RearWindowXObj::m_getScreenTop, 0, 0, 300 }, // D3
+ { "IndexColorToWindow", RearWindowXObj::m_indexColorToWindow, 1, 1, 300 }, // D3
+ { "PatToWindow", RearWindowXObj::m_patToWindow, 1, 1, 300 }, // D3
+ { "RGBColorToWindow", RearWindowXObj::m_rgbColorToWindow, 3, 3, 300 }, // D3
{ nullptr, nullptr, 0, 0, 0 }
};
diff --git a/engines/director/module.mk b/engines/director/module.mk
index de2681f1340..bc153d60146 100644
--- a/engines/director/module.mk
+++ b/engines/director/module.mk
@@ -137,6 +137,8 @@ MODULE_OBJS = \
lingo/xlibs/m/mazexobj.o \
lingo/xlibs/m/myfolder.o \
lingo/xlibs/g/getuinfo.o \
+ lingo/xlibs/g/getsoundxfcn.o \
+ lingo/xlibs/f/flushmousexfcn.o \
lingo/xlibs/o/openbleedwindowxcmd.o \
lingo/xlibs/s/stagectl.o \
lingo/xlibs/p/playsoundmoviexobj.o \
Commit: 493b6b4858f2edd527df053abbf4d25c5da406b3
https://github.com/scummvm/scummvm/commit/493b6b4858f2edd527df053abbf4d25c5da406b3
Author: Scott Percival (code at moral.net.au)
Date: 2026-06-17T12:32:20+02:00
Commit Message:
MACGUI: Fix keydown event processing if callback is undefined
Changed paths:
graphics/macgui/macwindow.cpp
diff --git a/graphics/macgui/macwindow.cpp b/graphics/macgui/macwindow.cpp
index 2823c889644..34bc95caf90 100644
--- a/graphics/macgui/macwindow.cpp
+++ b/graphics/macgui/macwindow.cpp
@@ -617,8 +617,13 @@ bool MacWindow::processEvent(Common::Event &event) {
if (!_editable && !(_wm->getActiveWidget() && _wm->getActiveWidget()->isEditable()))
return result;
- if (_wm->getActiveWidget())
- return result && _wm->getActiveWidget()->processEvent(event);
+ if (_wm->getActiveWidget()) {
+ if (_callback) {
+ return result && _wm->getActiveWidget()->processEvent(event);
+ } else {
+ return _wm->getActiveWidget()->processEvent(event);
+ }
+ }
return result;
More information about the Scummvm-git-logs
mailing list