[Scummvm-tracker] [ScummVM :: Bugs] #14892: DOTT: Crash when trying to play MM on Ed's computer
ScummVM :: Bugs
trac at scummvm.org
Fri Jan 26 11:34:59 UTC 2024
#14892: DOTT: Crash when trying to play MM on Ed's computer
---------------------+----------------------------------
Reporter: alexbevi | Owner: (none)
Type: defect | Status: new
Priority: normal | Component: Engine: SCUMM
Version: | Resolution:
Keywords: | Game: Day of the Tentacle
---------------------+----------------------------------
Comment (by eriktorbjorn):
It looks like when SurfaceSdlGraphicsManager creates a new _scalerPlugin
and _scaler, it does not create a new _mouseScaler. So while the scaler
changes from HQ3x (not allowed to scale the cursor) to Normal2x (allowed
to scale the cursor), _mouseScaler will still be a HQ scaler.
So it ought to be possible to reproduce this with other games, except
perhaps it also requires the cursor to be a particular size?
I'm not really familiar with the graphical backend, but something like
this seems to fix it for me:
{{{
diff --git a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
index 6990aa19c73..0eb3ee43d18 100644
--- a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
+++ b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
@@ -683,6 +683,11 @@ void
SurfaceSdlGraphicsManager::setGraphicsModeIntern() {
_scalerPlugin =
&_scalerPlugins[_videoMode.scalerIndex]->get<ScalerPluginObject>();
_scaler = _scalerPlugin->createInstance(format);
+
+ if (_mouseScaler != nullptr) {
+ delete _mouseScaler;
+ _mouseScaler =
_scalerPlugin->createInstance(_cursorFormat);
+ }
}
_scaler->setFactor(_videoMode.scaleFactor);
}}}
Maybe it should also call _mouseScaler->setFactor(_videoMode.scaleFactor),
but that's also done before the mouse is scaled in
SurfaceSdlGraphicsManager::blitCursor(). As I said, I don't know...
--
Ticket URL: <https://bugs.scummvm.org/ticket/14892#comment:3>
ScummVM :: Bugs <https://bugs.scummvm.org>
ScummVM
More information about the Scummvm-tracker
mailing list