mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2025-02-02 22:11:22 +00:00
SDL2 - Fix memory leek when exit game
add SDL_GL_DeleteContext and SDL_DestroyWindow
This commit is contained in:
parent
8d03392559
commit
fe5e45028d
1 changed files with 6 additions and 4 deletions
|
@ -1394,12 +1394,14 @@ void VID_Shutdown (void)
|
||||||
if (vid_initialized)
|
if (vid_initialized)
|
||||||
{
|
{
|
||||||
VID_Gamma_Shutdown (); //johnfitz
|
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);
|
SDL_QuitSubSystem(SDL_INIT_VIDEO);
|
||||||
draw_context = NULL;
|
draw_context = NULL;
|
||||||
#if defined(USE_SDL2)
|
|
||||||
gl_context = NULL;
|
|
||||||
#endif
|
|
||||||
PL_VID_Shutdown();
|
PL_VID_Shutdown();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue