Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SURFACESDL: [RFC] Possible fix for scaler crash (bug #14872) #5644

merged 1 commit into from Feb 11, 2024


Copy link

As discussed in it seems like when the scaler changes, the cursor scaler doesn't always change along with it. In this particular bug report, that caused it to use the HQ scaler for the mouse cursor, which normally isn't allowed. That, in combination with some hinky pointer arithmetics (that's also described in the bug report), then caused ScummVM to crash.

I hope that changing SurfaceSdlGraphicsManager::setGraphicsModeIntern() to refresh _mouseScaler along with _scaler (though only if there is a _mouseScaler to begin with, since I don't know if that's guaranteed) is the correct fix for it. I don't call mouseScaler>setFactor() because that's always left to SurfaceSdlGraphicsManager::blitCursor().

I don't know if the crash also points to some bug in the HQ scaler, and unfortunately I have only been able to reproduce the crash with the Macintosh versions of Loom and Indiana Jones and the Last Crusade so far.


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.
Copy link

dwatteau commented Feb 4, 2024

I can't comment on the code changes themselves, but I can confirm that this PR does fix the crash I've reported. Thanks.

Copy link

sev- commented Feb 11, 2024

Thank you! Yes, this looks like a correct fix.

@sev- sev- merged commit 57893f8 into scummvm:master Feb 11, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet
3 participants