[WII] fix loaders/history/core detect

This commit is contained in:
Toad King 2014-05-31 16:26:43 -04:00
parent 9212043920
commit d77c551aad

View File

@ -286,6 +286,10 @@ void main_exit(args_type() args)
driver.frontend_ctx->shutdown(false);
}
#ifdef HW_RVL
static char wii_new_argv1[PATH_MAX];
#endif
returntype main_entry(signature())
{
declare_argc();
@ -332,6 +336,23 @@ returntype main_entry(signature())
#endif
}
#ifdef HW_RVL
// needed on Wii; loaders follow a dumb standard where the path and filename are separate in the argument list
if (argc > 2 && argv[1] != NULL && argv[2] != NULL)
{
int i;
fill_pathname_join(wii_new_argv1, argv[1], argv[2], sizeof(wii_new_argv1));
argv[1] = wii_new_argv1;
// shift over remaining args
for (i = 3; i < argc; i++)
{
argv[i - 1] = argv[i];
}
argc--;
argv[argc] = NULL;
}
#endif
{
int init_ret;
if ((init_ret = rarch_main_init(argc, argv))) return_var(init_ret);