[Scummvm-git-logs] scummvm master -> 57893f8d3ac722ddf74c0fbd645d04e170ae4563
sev-
noreply at scummvm.org
Sun Feb 11 15:34:44 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:
57893f8d3a SURFACESDL: Refresh cursor scaler along whith standard scaler (bug #14872)
Commit: 57893f8d3ac722ddf74c0fbd645d04e170ae4563
https://github.com/scummvm/scummvm/commit/57893f8d3ac722ddf74c0fbd645d04e170ae4563
Author: Torbjörn Andersson (eriktorbjorn at users.sourceforge.net)
Date: 2024-02-11T16:34:39+01:00
Commit Message:
SURFACESDL: Refresh cursor scaler along whith standard scaler (bug #14872)
Otherwise, the cursor scaler and standard scaler may be different types,
which can lead to scaling the cursor with a scaler that normally doesn't
allow it. In this particular bug report, it caused ScummVM to crash.
Changed paths:
backends/graphics/surfacesdl/surfacesdl-graphics.cpp
diff --git a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
index aa7406215e1..af58588a891 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);
More information about the Scummvm-git-logs
mailing list