mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-05 17:20:30 +00:00
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.
This commit is contained in:
parent
42a533cd02
commit
4a7d75595d
@ -103,6 +103,7 @@ OpenGLGraphicsManager::~OpenGLGraphicsManager() {
|
||||
#if !USE_FORCED_GLES
|
||||
ShaderManager::destroy();
|
||||
#endif
|
||||
delete _pipeline;
|
||||
}
|
||||
|
||||
bool OpenGLGraphicsManager::hasFeature(OSystem::Feature f) const {
|
||||
|
@ -190,6 +190,10 @@ OpenGLSdlGraphicsManager::~OpenGLSdlGraphicsManager() {
|
||||
#if SDL_VERSION_ATLEAST(2, 0, 0)
|
||||
notifyContextDestroy();
|
||||
SDL_GL_DeleteContext(_glContext);
|
||||
#else
|
||||
if (_hwScreen) {
|
||||
notifyContextDestroy();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user