diff --git a/apple/OSX/platform.m b/apple/OSX/platform.m index 2f30d43407..c921d71fb9 100644 --- a/apple/OSX/platform.m +++ b/apple/OSX/platform.m @@ -317,10 +317,11 @@ static char** waiting_argv; - (IBAction)basicEvent:(id)sender { + unsigned cmd = (unsigned)[sender tag]; if (!g_extern.main_is_init) return; - apple_event_basic_command([sender tag]); + rarch_main_command(cmd); } - (void)alertDidEnd:(NSAlert *)alert returnCode:(NSInteger)returnCode contextInfo:(void *)contextInfo diff --git a/apple/common/apple_export.h b/apple/common/apple_export.h index 22e6988411..e7e6fd4f33 100644 --- a/apple/common/apple_export.h +++ b/apple/common/apple_export.h @@ -19,7 +19,6 @@ #include -extern void apple_event_basic_command(enum basic_event_t action); extern void apple_refresh_config(void); #endif diff --git a/apple/iOS/menu.m b/apple/iOS/menu.m index 31e2e91b46..db688c9972 100644 --- a/apple/iOS/menu.m +++ b/apple/iOS/menu.m @@ -529,14 +529,14 @@ static void RunActionSheet(const char* title, const struct string_list* items, U if (g_extern.main_is_init) { [self.sections addObject:[NSArray arrayWithObjects:BOXSTRING("Actions"), - [RAMenuItemBasic itemWithDescription:BOXSTRING("Reset Content") action:^{ [weakSelf performBasicAction:RESET]; }], - [RAMenuItemBasic itemWithDescription:BOXSTRING("Close Content") action:^{ [weakSelf performBasicAction:QUIT]; }], + [RAMenuItemBasic itemWithDescription:BOXSTRING("Reset Content") action:^{ [weakSelf performBasicAction:RARCH_CMD_RESET]; }], + [RAMenuItemBasic itemWithDescription:BOXSTRING("Close Content") action:^{ [weakSelf performBasicAction:RARCH_CMD_QUIT]; }], nil]]; [self.sections addObject:[NSArray arrayWithObjects:BOXSTRING("States"), [RAMenuItemStateSelect new], - [RAMenuItemBasic itemWithDescription:BOXSTRING("Load State") action:^{ [weakSelf performBasicAction:LOAD_STATE]; }], - [RAMenuItemBasic itemWithDescription:BOXSTRING("Save State") action:^{ [weakSelf performBasicAction:SAVE_STATE]; }], + [RAMenuItemBasic itemWithDescription:BOXSTRING("Load State") action:^{ [weakSelf performBasicAction:RARCH_CMD_LOAD_STATE]; }], + [RAMenuItemBasic itemWithDescription:BOXSTRING("Save State") action:^{ [weakSelf performBasicAction:RARCH_CMD_SAVE_STATE]; }], nil]]; [settings addObject:[RAMenuItemBasic itemWithDescription:BOXSTRING("Core") @@ -577,10 +577,10 @@ static void RunActionSheet(const char* title, const struct string_list* items, U self.navigationItem.leftBarButtonItem = nil; } -- (void)performBasicAction:(enum basic_event_t)action +- (void)performBasicAction:(unsigned)action { [[RetroArch_iOS get] showGameView]; - apple_event_basic_command(action); + rarch_main_command(action); } - (void)chooseCoreWithPath:(NSString*)path diff --git a/frontend/platform/platform_apple.c b/frontend/platform/platform_apple.c index 11b1b67035..3b1618e9d7 100644 --- a/frontend/platform/platform_apple.c +++ b/frontend/platform/platform_apple.c @@ -63,25 +63,6 @@ void apple_stop_iteration(void) iterate_observer = 0; } -void apple_event_basic_command(enum basic_event_t action) -{ - switch (action) - { - case RESET: - rarch_game_reset(); - return; - case LOAD_STATE: - rarch_load_state(); - return; - case SAVE_STATE: - rarch_save_state(); - return; - case QUIT: - g_extern.system.shutdown = true; - return; - } -} - static int frontend_apple_get_rating(void) { /* TODO/FIXME - look at unique identifier per device and