From 340fdfb342af1cfe8fdbc7de6efa3467a90e6784 Mon Sep 17 00:00:00 2001 From: Twinaphex Date: Wed, 11 Mar 2015 05:04:40 +0100 Subject: [PATCH] (iOS) Move g_view display to outside - into rarch_main - should reduce CPU usage a bit further --- apple/common/apple_gfx_context.c.inl | 5 ----- apple/iOS/platform.m | 3 +++ 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/apple/common/apple_gfx_context.c.inl b/apple/common/apple_gfx_context.c.inl index 93a9a9002c..45a79b2bfc 100644 --- a/apple/common/apple_gfx_context.c.inl +++ b/apple/common/apple_gfx_context.c.inl @@ -322,17 +322,12 @@ static void apple_gfx_ctx_swap_buffers(void *data) return; #ifdef OSX - #ifdef HAVE_NSOPENGL [g_context flushBuffer]; #else if (g_context.CGLContextObj) CGLFlushDrawable(g_context.CGLContextObj); #endif - -#else - if (g_view) - [g_view display]; #endif g_fast_forward_skips = g_is_syncing ? 0 : 3; diff --git a/apple/iOS/platform.m b/apple/iOS/platform.m index 102ee19841..b73c1bcda6 100644 --- a/apple/iOS/platform.m +++ b/apple/iOS/platform.m @@ -280,6 +280,9 @@ void notify_content_loaded(void) { ret = rarch_main_iterate(); while(CFRunLoopRunInMode(kCFRunLoopDefaultMode, 0.002, FALSE) == kCFRunLoopRunHandledSource); + + if (g_view && !g_runloop.is_idle) + [g_view display]; } main_exit(NULL);