mirror of
https://github.com/libretro/RetroArch
synced 2025-02-07 12:39:54 +00:00
Do away with objc_msgSend calls
This commit is contained in:
parent
4d4d839f05
commit
c3ba223fe2
@ -107,8 +107,6 @@ void *nsview_get_ptr(void)
|
||||
void nsview_set_ptr(CocoaView *p) { g_instance = p; }
|
||||
|
||||
#if TARGET_OS_OSX
|
||||
static SEL sel_flushBuffer;
|
||||
static SEL updateSel;
|
||||
static NSOpenGLPixelFormat* g_format;
|
||||
void *glcontext_get_ptr(void) { return (BRIDGE void *)g_context; }
|
||||
#endif
|
||||
@ -258,8 +256,8 @@ void cocoagl_gfx_ctx_update(void)
|
||||
CGLUpdateContext(g_hw_ctx.CGLContextObj);
|
||||
CGLUpdateContext(g_context.CGLContextObj);
|
||||
#else
|
||||
((void (*)(id, SEL))objc_msgSend)(g_hw_ctx, updateSel);
|
||||
((void (*)(id, SEL))objc_msgSend)(g_context, updateSel);
|
||||
[g_context update];
|
||||
[g_hw_ctx update];
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
@ -608,8 +606,8 @@ static void cocoagl_gfx_ctx_swap_buffers(void *data)
|
||||
return;
|
||||
|
||||
#if TARGET_OS_OSX
|
||||
((id (*)(id, SEL))objc_msgSend)(g_context, sel_flushBuffer);
|
||||
((id (*)(id, SEL))objc_msgSend)(g_hw_ctx, sel_flushBuffer);
|
||||
[g_context flushBuffer];
|
||||
[g_hw_ctx flushBuffer];
|
||||
#elif defined(HAVE_COCOATOUCH)
|
||||
if (g_view)
|
||||
[g_view display];
|
||||
@ -847,11 +845,6 @@ static void *cocoagl_gfx_ctx_init(void *video_driver)
|
||||
break;
|
||||
}
|
||||
|
||||
#if TARGET_OS_OSX
|
||||
sel_flushBuffer = sel_registerName("flushBuffer");
|
||||
updateSel = sel_registerName("update");
|
||||
#endif
|
||||
|
||||
return cocoa_ctx;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user