mirror of
https://github.com/libretro/RetroArch
synced 2025-03-03 22:14:17 +00:00
(Apple CocoaGL) Call flushBuffer with msg_objcSend
This commit is contained in:
parent
5838817bbd
commit
2bfadbdad5
@ -114,6 +114,7 @@ void nsview_set_ptr(CocoaView *p)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if TARGET_OS_OSX
|
#if TARGET_OS_OSX
|
||||||
|
static SEL sel_flushBuffer;
|
||||||
static NSOpenGLPixelFormat* g_format;
|
static NSOpenGLPixelFormat* g_format;
|
||||||
|
|
||||||
void *glcontext_get_ptr(void)
|
void *glcontext_get_ptr(void)
|
||||||
@ -632,8 +633,8 @@ static void cocoagl_gfx_ctx_swap_buffers(void *data)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
#if TARGET_OS_OSX
|
#if TARGET_OS_OSX
|
||||||
[g_context flushBuffer];
|
((id (*)(id, SEL))objc_msgSend)(g_context, sel_flushBuffer);
|
||||||
[g_hw_ctx flushBuffer];
|
((id (*)(id, SEL))objc_msgSend)(g_hw_ctx, sel_flushBuffer);
|
||||||
#elif defined(HAVE_COCOATOUCH)
|
#elif defined(HAVE_COCOATOUCH)
|
||||||
if (g_view)
|
if (g_view)
|
||||||
[g_view display];
|
[g_view display];
|
||||||
@ -868,6 +869,9 @@ static void *cocoagl_gfx_ctx_init(void *video_driver)
|
|||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!sel_flushBuffer)
|
||||||
|
sel_flushBuffer = sel_registerName("flushBuffer");
|
||||||
|
|
||||||
return cocoa_ctx;
|
return cocoa_ctx;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user