[Scummvm-git-logs] scummvm master -> f8f4a73d09af1c85224ca0514d63c324038824dc
sev-
noreply at scummvm.org
Mon Mar 2 21:20:44 UTC 2026
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:
f8f4a73d09 BACKENDS: OPENGL: Die nicely on insane OpenGL subsystem state
Commit: f8f4a73d09af1c85224ca0514d63c324038824dc
https://github.com/scummvm/scummvm/commit/f8f4a73d09af1c85224ca0514d63c324038824dc
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2026-03-02T22:19:46+01:00
Commit Message:
BACKENDS: OPENGL: Die nicely on insane OpenGL subsystem state
Changed paths:
backends/graphics/opengl/opengl-graphics.cpp
backends/graphics/openglsdl/openglsdl-graphics.cpp
diff --git a/backends/graphics/opengl/opengl-graphics.cpp b/backends/graphics/opengl/opengl-graphics.cpp
index d8598898d76..cec90363349 100644
--- a/backends/graphics/opengl/opengl-graphics.cpp
+++ b/backends/graphics/opengl/opengl-graphics.cpp
@@ -1460,6 +1460,10 @@ void OpenGLGraphicsManager::grabPalette(byte *colors, uint start, uint num) cons
}
void OpenGLGraphicsManager::handleResizeImpl(const int width, const int height) {
+ if (!_targetBuffer) {
+ error("PANIC: Resizing with empty context target buffer");
+ }
+
// Setup backbuffer size.
_targetBuffer->setSize(width, height);
diff --git a/backends/graphics/openglsdl/openglsdl-graphics.cpp b/backends/graphics/openglsdl/openglsdl-graphics.cpp
index 29b79def65d..79b4ecc180c 100644
--- a/backends/graphics/openglsdl/openglsdl-graphics.cpp
+++ b/backends/graphics/openglsdl/openglsdl-graphics.cpp
@@ -418,6 +418,11 @@ void OpenGLSdlGraphicsManager::notifyResize(const int width, const int height) {
currentHeight = height;
}
+ if (dpiScale < 0.01f || dpiScale > 100.0f) {
+ warning("OpenGLSdlGraphicsManager::notifyResize: Unreasonable DPI scale factor %f, ignoring it", dpiScale);
+ dpiScale = 2.0f;
+ }
+
debug(3, "req: %d x %d cur: %d x %d, scale: %f", width, height, currentWidth, currentHeight, dpiScale);
if (ConfMan.getBool("force_resize", Common::ConfigManager::kApplicationDomain)) {
More information about the Scummvm-git-logs
mailing list