diff --git a/gfx/drivers_context/cocoa_gl_ctx.m b/gfx/drivers_context/cocoa_gl_ctx.m index a7ff7aff16..55884ac478 100644 --- a/gfx/drivers_context/cocoa_gl_ctx.m +++ b/gfx/drivers_context/cocoa_gl_ctx.m @@ -55,24 +55,6 @@ typedef struct cocoa_ctx_data unsigned height; } cocoa_ctx_data_t; -#if defined(HAVE_COCOATOUCH) -#define GLContextClass EAGLContext -#define GLFrameworkID CFSTR("com.apple.opengles") -#define RAScreen UIScreen - -#ifndef UIUserInterfaceIdiomTV -#define UIUserInterfaceIdiomTV 2 -#endif - -#ifndef UIUserInterfaceIdiomCarPlay -#define UIUserInterfaceIdiomCarPlay 3 -#endif -#else -#define GLContextClass NSOpenGLContext -#define GLFrameworkID CFSTR("com.apple.opengl") -#define RAScreen NSScreen -#endif - static enum gfx_ctx_api cocoagl_api = GFX_CTX_NONE; #if defined(HAVE_COCOATOUCH) diff --git a/ui/drivers/cocoa/cocoa_common.h b/ui/drivers/cocoa/cocoa_common.h index b66bd9991b..a7162cfb82 100644 --- a/ui/drivers/cocoa/cocoa_common.h +++ b/ui/drivers/cocoa/cocoa_common.h @@ -24,6 +24,24 @@ #include "../../menu/menu_driver.h" #endif +#if defined(HAVE_COCOATOUCH) +#define GLContextClass EAGLContext +#define GLFrameworkID CFSTR("com.apple.opengles") +#define RAScreen UIScreen + +#ifndef UIUserInterfaceIdiomTV +#define UIUserInterfaceIdiomTV 2 +#endif + +#ifndef UIUserInterfaceIdiomCarPlay +#define UIUserInterfaceIdiomCarPlay 3 +#endif +#else +#define GLContextClass NSOpenGLContext +#define GLFrameworkID CFSTR("com.apple.opengl") +#define RAScreen NSScreen +#endif + typedef enum apple_view_type { APPLE_VIEW_TYPE_NONE, APPLE_VIEW_TYPE_OPENGL_ES,