system_process_args now has return type

This commit is contained in:
twinaphex 2013-04-28 05:18:56 +02:00
parent 295a6aadeb
commit 05ac7919b1
5 changed files with 20 additions and 8 deletions

View File

@ -132,10 +132,11 @@ int rarch_main(int argc, char *argv[])
menu_init();
system_process_args(argc, argv);
g_extern.lifecycle_mode_state &= ~(1ULL << MODE_MENU);
g_extern.lifecycle_mode_state |= (1ULL << MODE_INIT);
if (system_process_args(argc, argv) == 0)
{
g_extern.lifecycle_mode_state &= ~(1ULL << MODE_MENU);
g_extern.lifecycle_mode_state |= (1ULL << MODE_INIT);
}
for (;;)
{

View File

@ -335,8 +335,10 @@ static void system_exitspawn(void)
static void system_deinit(void) {}
#ifndef IS_SALAMANDER
static void system_process_args(int argc, char *argv[])
static int system_process_args(int argc, char *argv[])
{
int ret = 0;
if (argc > 2 && argv[1] != NULL && argv[2] != NULL)
{
char rom[PATH_MAX];
@ -347,9 +349,12 @@ static void system_process_args(int argc, char *argv[])
g_extern.lifecycle_mode_state |= (1ULL << MODE_LOAD_GAME);
g_extern.lifecycle_mode_state &= ~(1ULL << MODE_MENU);
g_extern.lifecycle_mode_state |= (1ULL << MODE_INIT);
ret = 1;
}
else
g_extern.lifecycle_mode_state |= (1ULL << MODE_EXTLAUNCH_SALAMANDER);
return ret;
}
#endif

View File

@ -342,8 +342,9 @@ static void system_init(void)
#endif
}
static void system_process_args(int argc, char *argv[])
static int system_process_args(int argc, char *argv[])
{
int ret = 0;
#ifdef HAVE_MULTIMAN
if (g_extern.lifecycle_mode_state & (1ULL << MODE_EXTLAUNCH_MULTIMAN))
{
@ -351,8 +352,11 @@ static void system_process_args(int argc, char *argv[])
strlcpy(g_extern.fullpath, argv[1], sizeof(g_extern.fullpath));
g_extern.lifecycle_mode_state &= ~(1ULL << MODE_MENU);
g_extern.lifecycle_mode_state |= (1ULL << MODE_INIT);
ret = 1;
}
#endif
return ret;
}
static void system_deinit(void)

View File

@ -97,10 +97,11 @@ static void system_init(void)
setup_callback();
}
static void system_process_args(int argc, char *argv[])
static int system_process_args(int argc, char *argv[])
{
(void)argc;
(void)argv;
return 0;
}
static void system_deinit(void)

View File

@ -262,10 +262,11 @@ static void system_init(void)
#endif
}
static void system_process_args(int argc, char *argv[])
static int system_process_args(int argc, char *argv[])
{
(void)argc;
(void)argv;
return 0;
}
static void system_deinit(void) {}