diff --git a/gfx/drivers_context/cocoa_gl_ctx.m b/gfx/drivers_context/cocoa_gl_ctx.m index f045cbe044..f64af414d2 100644 --- a/gfx/drivers_context/cocoa_gl_ctx.m +++ b/gfx/drivers_context/cocoa_gl_ctx.m @@ -176,21 +176,6 @@ static void cocoagl_gfx_ctx_set_flags(void *data, uint32_t flags) cocoa_ctx->core_hw_context_enable = true; } -void *glkitview_init(void) -{ -#if defined(HAVE_COCOATOUCH) - g_view = [GLKView new]; -#if TARGET_OS_IOS - g_view.multipleTouchEnabled = YES; -#endif - g_view.enableSetNeedsDisplay = NO; - - return (BRIDGE void *)((GLKView*)g_view); -#else - return nsview_get_ptr(); -#endif -} - #if defined(HAVE_COCOATOUCH) void cocoagl_bind_game_view_fbo(void) { diff --git a/ui/drivers/cocoa/cocoa_common.m b/ui/drivers/cocoa/cocoa_common.m index 848eae740d..b61d7c523b 100644 --- a/ui/drivers/cocoa/cocoa_common.m +++ b/ui/drivers/cocoa/cocoa_common.m @@ -35,7 +35,19 @@ /* forward declarations */ void cocoagl_gfx_ctx_update(void); -void *glkitview_init(void); + +#elif defined(HAVE_COCOATOUCH) +static void *glkitview_init(void) +{ + g_view = [GLKView new]; +#if TARGET_OS_IOS + g_view.multipleTouchEnabled = YES; +#endif + g_view.enableSetNeedsDisplay = NO; + + return (BRIDGE void *)((GLKView*)g_view); +} +#endif #ifdef HAVE_COCOATOUCH @interface CocoaView() {