diff --git a/src/platforms/rcore_ios.c b/src/platforms/rcore_ios.c index 5ba5edebb..45ef07f7b 100644 --- a/src/platforms/rcore_ios.c +++ b/src/platforms/rcore_ios.c @@ -2,8 +2,8 @@ * * rcore_ template - Functions to manage window, graphics device and inputs * -* PLATFORM: -* - TODO: Define the target platform for the core +* PLATFORM: IOS +* - iOS (arm64) * * LIMITATIONS: * - Limitation 01 @@ -357,7 +357,7 @@ void OpenURL(const char *url) if (strchr(url, '\'') != NULL) TRACELOG(LOG_WARNING, "SYSTEM: Provided URL could be potentially malicious, avoid [\'] character"); else { - // TODO: + TRACELOG(LOG_WARNING, "OpenURL() not implemented on target platform"); } } @@ -585,6 +585,27 @@ int InitPlatform(void) void ClosePlatform(void) { // TODO: De-initialize graphics, inputs and more + + // Close surface, context and display + if (platform.device != EGL_NO_DISPLAY) + { + eglMakeCurrent(platform.device, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); + + if (platform.surface != EGL_NO_SURFACE) + { + eglDestroySurface(platform.device, platform.surface); + platform.surface = EGL_NO_SURFACE; + } + + if (platform.context != EGL_NO_CONTEXT) + { + eglDestroyContext(platform.device, platform.context); + platform.context = EGL_NO_CONTEXT; + } + + eglTerminate(platform.device); + platform.device = EGL_NO_DISPLAY; + } } // EOF