Go from load content directly into game

This commit is contained in:
Jay McCarthy 2014-12-31 15:24:50 -05:00
parent 73b4fe2f12
commit c7cc2827a0
3 changed files with 16 additions and 2 deletions

View File

@ -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();

View File

@ -17,6 +17,7 @@
#include "../../apple/common/CFExtensions.h"
#include "../frontend.h"
#include "../../menu/disp/ios.h"
#include <stdint.h>
#include <boolean.h>
@ -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)

View File

@ -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