(Apple) Have apple_rarch_load_content just call rarch_main

This commit is contained in:
Twinaphex 2014-07-21 07:41:11 +02:00
parent d014b7f059
commit 5303e1f094
3 changed files with 10 additions and 10 deletions

View File

@ -65,6 +65,10 @@
#endif
#if !defined(__APPLE__)
#define HAVE_MAIN_LOOP
#endif
static retro_keyboard_event_t key_event;
#ifdef HAVE_MENU
@ -374,6 +378,7 @@ returntype main_entry(signature())
free_args(wrap_args, argv_copy, ARRAY_SIZE(argv_copy));
free(wrap_args);
#if defined(HAVE_MAIN_LOOP)
#if defined(HAVE_MENU)
while (!main_entry_iterate(signature_expand(), args));
#else
@ -381,6 +386,7 @@ returntype main_entry(signature())
#endif
main_exit(args);
#endif
returnfunc();
}

View File

@ -24,9 +24,11 @@
#if defined(ANDROID)
#define args_type() struct android_app*
#define signature() void* data
#define returntype void
#else
#define args_type() void*
#define signature() int argc, char *argv[]
#define returntype int
#endif
#ifdef __cplusplus
@ -35,6 +37,7 @@ extern "C" {
int main_entry_iterate(signature(), args_type() args);
void main_exit(args_type() args);
returntype main_entry(signature());
#ifdef __cplusplus
}

View File

@ -84,16 +84,7 @@ void apple_event_basic_command(enum basic_event_t action)
int apple_rarch_load_content(int *argc, char* argv[])
{
rarch_main_clear_state();
rarch_init_msg_queue();
if (rarch_main_init(*argc, argv))
return 1;
if (!g_extern.libretro_dummy)
menu_rom_history_push_current();
g_extern.lifecycle_state |= 1ULL << MODE_GAME;
rarch_main(*argc, argv);
return 0;
}