mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-25 00:49:47 +00:00
(OSX) Refactor apple_gfx_ctx_swap_buffers for OSX
This commit is contained in:
parent
ceee48fc39
commit
f1820ce710
@ -97,11 +97,6 @@ static void apple_gfx_ctx_flush_buffer(void);
|
||||
apple_gfx_ctx_update();
|
||||
}
|
||||
|
||||
- (void)display
|
||||
{
|
||||
apple_gfx_ctx_flush_buffer();
|
||||
}
|
||||
|
||||
/* Stop the annoying sound when pressing a key. */
|
||||
- (BOOL)acceptsFirstResponder
|
||||
{
|
||||
|
@ -83,15 +83,6 @@ static void apple_gfx_ctx_update(void)
|
||||
#endif
|
||||
}
|
||||
|
||||
static void apple_gfx_ctx_flush_buffer(void)
|
||||
{
|
||||
#ifdef OSX
|
||||
CGLContextObj context = (CGLContextObj)g_context.CGLContextObj;
|
||||
if (context)
|
||||
CGLFlushDrawable(context);
|
||||
#endif
|
||||
}
|
||||
|
||||
static bool apple_gfx_ctx_init(void *data)
|
||||
{
|
||||
(void)data;
|
||||
@ -270,8 +261,15 @@ static void apple_gfx_ctx_swap_buffers(void *data)
|
||||
{
|
||||
if (!(--g_fast_forward_skips < 0))
|
||||
return;
|
||||
|
||||
|
||||
#ifdef OSX
|
||||
CGLContextObj context = (CGLContextObj)g_context.CGLContextObj;
|
||||
if (context)
|
||||
CGLFlushDrawable(context);
|
||||
#else
|
||||
[g_view display];
|
||||
#endif
|
||||
|
||||
g_fast_forward_skips = g_is_syncing ? 0 : 3;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user