Move glkitview_init to cocoa_common.m

This commit is contained in:
twinaphex 2019-11-19 20:58:13 +01:00
parent b241b5769b
commit 964fcda79a
2 changed files with 13 additions and 16 deletions

View File

@ -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)
{

View File

@ -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()<GCDWebUploaderDelegate> {