mirror of
https://github.com/libretro/RetroArch
synced 2025-03-29 04:20:28 +00:00
Go from load content directly into game
This commit is contained in:
parent
73b4fe2f12
commit
c7cc2827a0
@ -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();
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user