[Scummvm-git-logs] scummvm master -> 4a7d75595dd8eb0800d0a67e5ebb9c35c10a45a4
lephilousophe
noreply at scummvm.org
Sun Feb 12 17:06:49 UTC 2023
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:
4a7d75595d OPENGLSDL: Make sure pipeline is destroyed when Manager is destroyed
Commit: 4a7d75595dd8eb0800d0a67e5ebb9c35c10a45a4
https://github.com/scummvm/scummvm/commit/4a7d75595dd8eb0800d0a67e5ebb9c35c10a45a4
Author: Le Philousophe (lephilousophe at users.noreply.github.com)
Date: 2023-02-12T18:06:21+01:00
Commit Message:
OPENGLSDL: Make sure pipeline is destroyed when Manager is destroyed
When destroying the Manager its context is always destroyed.
Destroying OpenGLGraphicsManager must destroy the pipeline too.
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 19078c46e76..3128b18644c 100644
--- a/backends/graphics/opengl/opengl-graphics.cpp
+++ b/backends/graphics/opengl/opengl-graphics.cpp
@@ -103,6 +103,7 @@ OpenGLGraphicsManager::~OpenGLGraphicsManager() {
#if !USE_FORCED_GLES
ShaderManager::destroy();
#endif
+ delete _pipeline;
}
bool OpenGLGraphicsManager::hasFeature(OSystem::Feature f) const {
diff --git a/backends/graphics/openglsdl/openglsdl-graphics.cpp b/backends/graphics/openglsdl/openglsdl-graphics.cpp
index ebc1ccc2a82..19acd13ef70 100644
--- a/backends/graphics/openglsdl/openglsdl-graphics.cpp
+++ b/backends/graphics/openglsdl/openglsdl-graphics.cpp
@@ -190,6 +190,10 @@ OpenGLSdlGraphicsManager::~OpenGLSdlGraphicsManager() {
#if SDL_VERSION_ATLEAST(2, 0, 0)
notifyContextDestroy();
SDL_GL_DeleteContext(_glContext);
+#else
+ if (_hwScreen) {
+ notifyContextDestroy();
+ }
#endif
}
More information about the Scummvm-git-logs
mailing list