mirror of
https://github.com/libretro/RetroArch
synced 2025-03-01 16:13:40 +00:00
(GX) Add new code for correcting argc/argv - doesn't work yet
This commit is contained in:
parent
bca8a4c6d7
commit
2c5bde4f84
@ -256,6 +256,7 @@ static void frontend_gx_get_environment_settings(int *argc, char *argv[],
|
||||
// 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)
|
||||
{
|
||||
#if 1
|
||||
int i;
|
||||
char wii_new_argv1[PATH_MAX];
|
||||
fill_pathname_join(wii_new_argv1, argv[1], argv[2], sizeof(wii_new_argv1));
|
||||
@ -267,6 +268,24 @@ static void frontend_gx_get_environment_settings(int *argc, char *argv[],
|
||||
}
|
||||
*argc = *argc - 1;
|
||||
argv[*argc] = NULL;
|
||||
#else
|
||||
char path[PATH_MAX];
|
||||
struct rarch_main_wrap *args = (struct rarch_main_wrap*)params_data;
|
||||
args = (struct rarch_main_wrap*)malloc(sizeof(struct rarch_main_wrap));
|
||||
|
||||
if (!args)
|
||||
return;
|
||||
|
||||
fill_pathname_join(path, argv[1], argv[2], sizeof(path));
|
||||
|
||||
args->no_rom = false;
|
||||
args->verbose = false;
|
||||
args->config_path = NULL;
|
||||
args->sram_path = NULL;
|
||||
args->state_path = NULL;
|
||||
args->rom_path = path;
|
||||
args->libretro_path = NULL;
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
@ -363,11 +382,13 @@ static int frontend_gx_process_args(int *argc, char *argv[], void *args)
|
||||
rarch_environment_cb(RETRO_ENVIRONMENT_SET_LIBRETRO_PATH, path);
|
||||
}
|
||||
|
||||
#if 1
|
||||
if (*argc > 2 && argv[1] != NULL && argv[2] != NULL)
|
||||
{
|
||||
fill_pathname_join(g_extern.fullpath, argv[1], argv[2], sizeof(g_extern.fullpath));
|
||||
ret = 0;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
return ret;
|
||||
|
Loading…
x
Reference in New Issue
Block a user