unload libgl on exit, fix SDL_RWclose in progress_write()
This commit is contained in:
parent
c5c98d2324
commit
41bf5e5ad0
4 changed files with 9 additions and 1 deletions
|
@ -320,7 +320,7 @@ static void progress_write(SDL_RWops *file) {
|
|||
}
|
||||
|
||||
free(buf);
|
||||
SDL_RWclose(file);
|
||||
SDL_RWclose(vfile);
|
||||
}
|
||||
|
||||
#ifdef PROGRESS_UNLOCK_ALL
|
||||
|
|
|
@ -118,6 +118,12 @@ void load_gl_library(void) {
|
|||
#endif
|
||||
}
|
||||
|
||||
void unload_gl_library(void) {
|
||||
#ifndef LINK_TO_LIBGL
|
||||
SDL_GL_UnloadLibrary();
|
||||
#endif
|
||||
}
|
||||
|
||||
void load_gl_functions(void) {
|
||||
#ifndef LINK_TO_LIBGL
|
||||
#define GLDEF(glname,tsname,typename) tsname = (typename)get_proc_address(#glname);
|
||||
|
|
|
@ -102,6 +102,7 @@ extern struct glext_s glext;
|
|||
void load_gl_library(void);
|
||||
void load_gl_functions(void);
|
||||
void check_gl_extensions(void);
|
||||
void unload_gl_library(void);
|
||||
|
||||
#define gluPerspective tsgluPerspective
|
||||
void gluPerspective(GLdouble fovY, GLdouble aspect, GLdouble zNear, GLdouble zFar);
|
||||
|
|
|
@ -232,5 +232,6 @@ void video_init(void) {
|
|||
void video_shutdown(void) {
|
||||
SDL_DestroyWindow(video.window);
|
||||
SDL_GL_DeleteContext(video.glcontext);
|
||||
unload_gl_library();
|
||||
free(video.modes);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue