diff --git a/ui/drivers/cocoa/cocoa_common.h b/ui/drivers/cocoa/cocoa_common.h index 93f4322a60..4fcb2ac8d0 100644 --- a/ui/drivers/cocoa/cocoa_common.h +++ b/ui/drivers/cocoa/cocoa_common.h @@ -112,8 +112,6 @@ void get_ios_version(int *major, int *minor); #endif -extern void apple_display_alert(const char *message, const char *title); - #define BOXSTRING(x) [NSString stringWithUTF8String:x] #define BOXINT(x) [NSNumber numberWithInt:x] #define BOXUINT(x) [NSNumber numberWithUnsignedInt:x] diff --git a/ui/drivers/ui_cocoa.m b/ui/drivers/ui_cocoa.m index 8395b46f32..f6227425d9 100644 --- a/ui/drivers/ui_cocoa.m +++ b/ui/drivers/ui_cocoa.m @@ -281,7 +281,14 @@ static char** waiting_argv; } else { - apple_display_alert("Cannot open multiple files", "RetroArch"); + ui_msg_window_state msg_window_state; + const ui_msg_window_t *msg_window = ui_companion_driver_get_msg_window_ptr(); + if (msg_window) + { + msg_window_state.text = strdup("Cannot open multiple files"); + msg_window_state.text = strdup("RetroArch"); + msg_window->information(&msg_window_state); + } [sender replyToOpenOrPrint:NSApplicationDelegateReplyFailure]; } } @@ -504,17 +511,6 @@ int main(int argc, char *argv[]) return NSApplicationMain(argc, (const char **) argv); } -void apple_display_alert(const char *message, const char *title) -{ - ui_msg_window_state msg_window_state; - const ui_msg_window_t *msg_window = ui_companion_driver_get_msg_window_ptr(); - if (!msg_window) - return; - msg_window_state.text = strdup(message); - msg_window_state.text = (*title) ? strdup(title) : strdup("RetroArch"); - msg_window->information(&msg_window_state); -} - typedef struct ui_companion_cocoa { void *empty; diff --git a/ui/drivers/ui_cocoatouch.m b/ui/drivers/ui_cocoatouch.m index ee088add9c..f51f04300e 100644 --- a/ui/drivers/ui_cocoatouch.m +++ b/ui/drivers/ui_cocoatouch.m @@ -534,7 +534,8 @@ int main(int argc, char *argv[]) } } -void apple_display_alert(const char *message, const char *title) +#if 0 +static void apple_display_alert(const char *message, const char *title) { UIAlertView* alert = [[UIAlertView alloc] initWithTitle:BOXSTRING(title) message:BOXSTRING(message) @@ -543,6 +544,7 @@ void apple_display_alert(const char *message, const char *title) otherButtonTitles:nil]; [alert show]; } +#endif static void apple_rarch_exited(void) {