[client] fix too early release of OpenGL context

Fixes a problem where resolution changes would require a restart of
the client
This commit is contained in:
Geoffrey McRae 2018-05-31 18:54:29 +10:00
parent 32dca9ea3f
commit 14954cc426

View File

@ -191,6 +191,12 @@ void opengl_deinitialize(void * opaque)
if (this->mouseData)
free(this->mouseData);
if (this->glContext)
{
SDL_GL_DeleteContext(this->glContext);
this->glContext = NULL;
}
LG_LOCK_FREE(this->formatLock);
LG_LOCK_FREE(this->syncLock );
LG_LOCK_FREE(this->mouseLock );
@ -993,12 +999,6 @@ static void deconfigure(struct Inst * this)
}
}
if (this->glContext)
{
SDL_GL_DeleteContext(this->glContext);
this->glContext = NULL;
}
if (this->decoderData)
{
this->decoder->destroy(this->decoderData);