aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/scumm/scumm.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp
index 5555d961b2..a24fc650a5 100644
--- a/engines/scumm/scumm.cpp
+++ b/engines/scumm/scumm.cpp
@@ -550,6 +550,12 @@ ScummEngine::ScummEngine(OSystem *syst, const DetectorResult &dr)
Common::addDebugChannel(debugChannels[i].flag, debugChannels[i].channel, debugChannels[i].desc);
g_eventRec.registerRandomSource(_rnd, "scumm");
+
+ // Setup a dummy cursor and palette. The latter is only
+ // required by HE, thus we might consider to do that only
+ // for HE games.
+ CursorMan.pushCursor(NULL, 0, 0, 0, 0, 0);
+ CursorMan.pushCursorPalette(NULL, 0, 0);
}
@@ -606,6 +612,10 @@ ScummEngine::~ScummEngine() {
delete _res;
delete _gdi;
+
+ // Remove our cursors again to prevent memory leaks
+ CursorMan.popCursor();
+ CursorMan.popCursorPalette();
}