SDL: cocoa/gles: do not unload EGL when context is destroyed (0efb3)

From 0efb31ef325dd1116cf2aff5191e4617b26f218e Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Mon, 20 Feb 2023 10:40:54 -0800
Subject: [PATCH] cocoa/gles: do not unload EGL when context is destroyed

(cherry picked from commit e8091b89830c3b9bb19eff76463a6e2525f05fa5)
---
 src/video/cocoa/SDL_cocoaopengles.m | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/video/cocoa/SDL_cocoaopengles.m b/src/video/cocoa/SDL_cocoaopengles.m
index 3efcb47565f0..27091c5dcc3e 100644
--- a/src/video/cocoa/SDL_cocoaopengles.m
+++ b/src/video/cocoa/SDL_cocoaopengles.m
@@ -49,7 +49,7 @@
         return SDL_SetError("SDL not configured with OpenGL/CGL support");
 #endif
     }
-    
+
     if (_this->egl_data == NULL) {
         return SDL_EGL_LoadLibrary(_this, NULL, EGL_DEFAULT_DISPLAY, 0);
     }
@@ -95,7 +95,6 @@
 { @autoreleasepool
 {
     SDL_EGL_DeleteContext(_this, context);
-    Cocoa_GLES_UnloadLibrary(_this);
 }}
 
 int
@@ -133,7 +132,7 @@
         }
         _this->gl_config.driver_loaded = 1;
     }
-  
+
     /* Create the GLES window surface */
     v = windowdata.nswindow.contentView;
     windowdata.egl_surface = SDL_EGL_CreateSurface(_this, (__bridge NativeWindowType)[v layer]);