From c7cc2827a0e737d693858e03bbc9e5ca70a05c72 Mon Sep 17 00:00:00 2001 From: Jay McCarthy Date: Wed, 31 Dec 2014 15:24:50 -0500 Subject: [PATCH] Go from load content directly into game --- apple/iOS/platform.m | 10 +++++++++- frontend/platform/platform_apple.c | 5 +++++ menu/disp/ios.h | 3 ++- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/apple/iOS/platform.m b/apple/iOS/platform.m index 0a57c9f3e9..d57832ee9c 100644 --- a/apple/iOS/platform.m +++ b/apple/iOS/platform.m @@ -217,13 +217,20 @@ enum return (RetroArch_iOS*)[[UIApplication sharedApplication] delegate]; } -void switch_to_ios() { +void switch_to_ios(void) { if ( apple_platform != NULL ) { RetroArch_iOS *ap = (RetroArch_iOS *)apple_platform; [ap showPauseMenu:ap]; } } +void notify_content_loaded(void) { + if ( apple_platform != NULL ) { + RetroArch_iOS *ap = (RetroArch_iOS *)apple_platform; + [ap showGameView]; + } +} + - (void)applicationDidFinishLaunching:(UIApplication *)application { apple_platform = self; @@ -244,6 +251,7 @@ void switch_to_ios() { if ( driver.menu_ctx && driver.menu_ctx == &menu_ctx_ios && driver.menu && driver.menu->userdata ) { ios_handle_t *ih = (ios_handle_t*)driver.menu->userdata; ih->switch_to_ios = switch_to_ios; + ih->notify_content_loaded = notify_content_loaded; } apple_gamecontroller_init(); diff --git a/frontend/platform/platform_apple.c b/frontend/platform/platform_apple.c index 21b7f08fd4..387ed1710b 100644 --- a/frontend/platform/platform_apple.c +++ b/frontend/platform/platform_apple.c @@ -17,6 +17,7 @@ #include "../../apple/common/CFExtensions.h" #include "../frontend.h" +#include "../../menu/disp/ios.h" #include #include @@ -183,6 +184,10 @@ extern void apple_rarch_exited(void); static void frontend_apple_load_content(void) { + if ( driver.menu_ctx && driver.menu_ctx == &menu_ctx_ios && driver.menu && driver.menu->userdata ) { + ios_handle_t *ih = (ios_handle_t*)driver.menu->userdata; + ih->notify_content_loaded(); + } } static void frontend_apple_shutdown(bool unused) diff --git a/menu/disp/ios.h b/menu/disp/ios.h index dc6ae08cea..5e1de0fce0 100644 --- a/menu/disp/ios.h +++ b/menu/disp/ios.h @@ -18,7 +18,8 @@ typedef struct ios_handle { - void (*switch_to_ios)(void); + void (*switch_to_ios)(void); + void (*notify_content_loaded)(void); } ios_handle_t; #endif