From aa078cdae8ab28f5ea7f9d88dc804bb1edee34fb Mon Sep 17 00:00:00 2001 From: Twinaphex Date: Tue, 22 Jul 2014 05:13:48 +0200 Subject: [PATCH] (Apple) Implement frontend_apple_shutdown --- apple/common/RetroArch_Apple.h | 4 ++-- frontend/platform/platform_apple.c | 12 ++++++++---- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/apple/common/RetroArch_Apple.h b/apple/common/RetroArch_Apple.h index 3e673b8481..5d7adf054e 100644 --- a/apple/common/RetroArch_Apple.h +++ b/apple/common/RetroArch_Apple.h @@ -44,8 +44,8 @@ extern id apple_platform; // main.m extern void apple_run_core(NSString* core, const char* file); -extern void apple_start_iteration(); -extern void apple_stop_iteration(); +extern void apple_start_iteration(void); +extern void apple_stop_iteration(void); // utility.m extern void apple_display_alert(const char *message, const char *title); diff --git a/frontend/platform/platform_apple.c b/frontend/platform/platform_apple.c index bfc85d81c8..88ce3f981d 100644 --- a/frontend/platform/platform_apple.c +++ b/frontend/platform/platform_apple.c @@ -26,8 +26,6 @@ static CFRunLoopObserverRef iterate_observer; -extern void apple_rarch_exited(void); - static void do_iteration(void) { if (!(iterate_observer && g_extern.main_is_init && !g_extern.is_paused)) @@ -36,7 +34,6 @@ static void do_iteration(void) if (main_entry_iterate(0, NULL, NULL)) { main_exit(NULL); - apple_rarch_exited(); return; } @@ -62,6 +59,13 @@ void apple_stop_iteration(void) iterate_observer = 0; } +extern void apple_rarch_exited(void); + +static void frontend_apple_shutdown(bool unused) +{ + apple_rarch_exited(); +} + static int frontend_apple_get_rating(void) { /* TODO/FIXME - look at unique identifier per device and @@ -76,7 +80,7 @@ const frontend_ctx_driver_t frontend_ctx_apple = { NULL, /* process_args */ NULL, /* process_events */ NULL, /* exec */ - NULL, /* shutdown */ + frontend_apple_shutdown, /* shutdown */ NULL, /* get_name */ frontend_apple_get_rating, /* get_rating */ "apple",