[Scummvm-git-logs] scummvm master -> 4a7dbd050358e50246eabbdca6a06861c327fbb8
lephilousophe
noreply at scummvm.org
Sun Jul 20 15:48:41 UTC 2025
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .
Summary:
4a7dbd0503 BACKENDS: OPENGL: Don't fault when trying to lock screen in 3D mode
Commit: 4a7dbd050358e50246eabbdca6a06861c327fbb8
https://github.com/scummvm/scummvm/commit/4a7dbd050358e50246eabbdca6a06861c327fbb8
Author: Le Philousophe (lephilousophe at users.noreply.github.com)
Date: 2025-07-20T17:45:08+02:00
Commit Message:
BACKENDS: OPENGL: Don't fault when trying to lock screen in 3D mode
This has never crashed in Android but it seems it was pure luck.
The standard extended save code tries to get a thumbnail from the
screen and causes assertion fault with default implementation.
Changed paths:
backends/graphics/opengl/opengl-graphics.cpp
diff --git a/backends/graphics/opengl/opengl-graphics.cpp b/backends/graphics/opengl/opengl-graphics.cpp
index ec48fee945d..8529efb6356 100644
--- a/backends/graphics/opengl/opengl-graphics.cpp
+++ b/backends/graphics/opengl/opengl-graphics.cpp
@@ -957,11 +957,20 @@ void OpenGLGraphicsManager::presentBuffer() {
}
Graphics::Surface *OpenGLGraphicsManager::lockScreen() {
+ // Autosave tries to lock the screen to get a screenshot
+ // Fail it like with old graphics3d backends
+ // TODO: Try to return a surface containing a screenshot
+ if (_renderer3d) {
+ return nullptr;
+ }
+
assert(_gameScreen);
return _gameScreen->getSurface();
}
void OpenGLGraphicsManager::unlockScreen() {
+ // In 3D mode, we always fail to lock the screen
+ // The code is never supposed to call unlockScreen
assert(_gameScreen);
_gameScreen->flagDirty();
}
More information about the Scummvm-git-logs
mailing list