Skip to content

Commit

Permalink
kmsdrm: unload EGL and GL lib only if using them.
Browse files Browse the repository at this point in the history
  • Loading branch information
vanfanel committed Aug 25, 2020
1 parent 9b43464 commit fe3f979
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/video/kmsdrm/SDL_kmsdrmvideo.c
Expand Up @@ -794,8 +794,8 @@ KMSDRM_DestroyOldSurfaces(_THIS)

/* Destroy the old GBM surface and buffers. */
if (dispdata->old_bo) {
KMSDRM_gbm_surface_release_buffer(dispdata->old_gs, dispdata->old_bo);
dispdata->old_bo = NULL;
KMSDRM_gbm_surface_release_buffer(dispdata->old_gs, dispdata->old_bo);
dispdata->old_bo = NULL;
}

if (dispdata->old_next_bo) {
Expand Down Expand Up @@ -1196,6 +1196,7 @@ KMSDRM_VideoQuit(_THIS)
viddata->max_windows = 0;
viddata->num_windows = 0;

#if SDL_VIDEO_OPENGL_EGL
if (_this->gl_config.driver_loaded) {
SDL_GL_UnloadLibrary();
}
Expand All @@ -1208,7 +1209,7 @@ KMSDRM_VideoQuit(_THIS)
which happens to be here.
*/

#if SDL_VIDEO_OPENGL_EGL

SDL_EGL_UnloadLibrary(_this);
#endif

Expand Down

0 comments on commit fe3f979

Please sign in to comment.