SDL: Add a way to reset OpenGL graphics by pressing F7.

This commit is contained in:
Henrik Rydgård committed 2023-05-29 11:48:03 +02:00
1 parent 7912eef0b7
commit d167a11b1c
3 files changed
+50 -8

No files matched your search

+3
View File
@@ -449,9 +449,12 @@ void SDLGLGraphicsContext::Shutdown() {
void SDLGLGraphicsContext::ShutdownFromRenderThread() {
delete draw_;
draw_ = nullptr;
renderManager_ = nullptr;
#ifdef USING_EGL
EGL_Close();
#endif
SDL_GL_DeleteContext(glContext);
glContext = nullptr;
window_ = nullptr;
}