SDL2 - Fix memory leek when exit game

add SDL_GL_DeleteContext and SDL_DestroyWindow
This commit is contained in:
BeWorld 2023-03-19 10:55:44 +01:00
parent 8d03392559
commit fe5e45028d

View file

@ -1394,12 +1394,14 @@ void VID_Shutdown (void)
if (vid_initialized)
{
VID_Gamma_Shutdown (); //johnfitz
#if defined(USE_SDL2)
SDL_GL_DeleteContext(gl_context);
gl_context = NULL;
SDL_DestroyWindow(draw_context);
#endif
SDL_QuitSubSystem(SDL_INIT_VIDEO);
draw_context = NULL;
#if defined(USE_SDL2)
gl_context = NULL;
#endif
PL_VID_Shutdown();
}
}