(Apple) Implement apple_content_loaded

This commit is contained in:
Twinaphex 2014-10-17 04:58:05 +02:00
parent b2aab151c8
commit 861f9d14cd
3 changed files with 16 additions and 9 deletions

View File

@ -40,12 +40,15 @@ extern char** apple_argv;
extern id<RetroArch_Platform> apple_platform;
// main.m
extern void apple_run_core(int argc, char **argv);
extern void apple_start_iteration(void);
extern void apple_stop_iteration(void);
void apple_run_core(int argc, char **argv);
void apple_start_iteration(void);
void apple_stop_iteration(void);
void apple_content_loaded(const char *core_path, const char *full_path);
void apple_rarch_exited(void);
// utility.m
extern void apple_display_alert(const char *message, const char *title);
void apple_display_alert(const char *message, const char *title);
@interface RANumberFormatter : NSNumberFormatter
#ifdef IOS

View File

@ -23,7 +23,10 @@
id<RetroArch_Platform> apple_platform;
void apple_rarch_exited(void);
void apple_content_loaded(const char *core_path, const char *full_path)
{
[apple_platform loadingCore:BOXSTRING(core_path) withFile:full_path];
}
void apple_rarch_exited(void)
{
@ -33,7 +36,6 @@ void apple_rarch_exited(void)
void apple_run_core(int argc, char **argv)
{
static char config_path[PATH_MAX];
[apple_platform loadingCore:nil withFile:nil];
strlcpy(config_path, g_defaults.config_path, sizeof(config_path));

View File

@ -24,9 +24,10 @@
#include <stddef.h>
#include <string.h>
/* Forward declarations */
void apple_start_iteration(void);
void apple_stop_iteration(void);
void apple_content_loaded(const char *, const char *);
static CFRunLoopObserverRef iterate_observer;
@ -177,8 +178,9 @@ static void frontend_apple_get_environment_settings(int *argc, char *argv[],
extern void apple_rarch_exited(void);
static void frontend_apple_load_content(void)
static void frontend_apple_content_loaded(void)
{
apple_content_loaded(g_settings.libretro, g_extern.fullpath);
}
static void frontend_apple_shutdown(bool unused)
@ -204,6 +206,6 @@ const frontend_ctx_driver_t frontend_ctx_apple = {
frontend_apple_shutdown, /* shutdown */
NULL, /* get_name */
frontend_apple_get_rating, /* get_rating */
frontend_apple_load_content, /* load_content */
frontend_apple_content_loaded, /* load_content */
"apple",
};