Quellcode durchsuchen

[KMSDRM] Improve the way to test if last window is being destroyed.

Vanfanel vor 4 Jahren
Ursprung
Commit
4acd1dcad4
1 geänderte Dateien mit 1 neuen und 1 gelöschten Zeilen
  1. 1 1
      src/video/kmsdrm/SDL_kmsdrmvideo.c

+ 1 - 1
src/video/kmsdrm/SDL_kmsdrmvideo.c

@@ -1088,7 +1088,7 @@ KMSDRM_DestroyWindow(_THIS, SDL_Window *window)
         KMSDRM_DestroySurfaces(_this, window);
 
         /* Unload library and deinit GBM, but only if this is the last remaining window.*/
-        if (viddata->num_windows < 2) {
+        if ((viddata->num_windows - 1) == 0) {
 
 	    /* Unload EGL/GL library and free egl_data.  */
 	    if (_this->egl_data) {