mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-28 02:30:35 +00:00
Issue when argv[0] is usb1:/... on Wii
When RA dol file launched from Wiiflow, getcwd return nothing, dirs[DEFAULT_DIR_CORE] is empty and RA "info", "autoconfig",.... dirs are on root / This seems to be because argv[0] is starting with "usb1://...dol" (maybe incompatible libfat) This patch allow to default dirs[DEFAULT_DIR_CORE] on Wii to the dirname of the DOL in such cases.
This commit is contained in:
parent
ded9a428de
commit
3e4aca8666
@ -192,6 +192,12 @@ static void frontend_gx_get_env(
|
||||
* as a result the cfg file is not found. */
|
||||
if (*argc > 2 && argv[1] != NULL && argv[2] != NULL)
|
||||
{
|
||||
if (strncmp("usb1", argv[0], 4) == 0 || strncmp("usb2", argv[0], 4) == 0)
|
||||
{
|
||||
strncpy(g_defaults.dirs[DEFAULT_DIR_CORE],argv[0], strlen(argv[0]));
|
||||
strncpy(g_defaults.dirs[DEFAULT_DIR_CORE]," usb", 4);
|
||||
memmove(g_defaults.dirs[DEFAULT_DIR_CORE], g_defaults.dirs[DEFAULT_DIR_CORE]+1, strlen(g_defaults.dirs[DEFAULT_DIR_CORE]));
|
||||
}
|
||||
if(gx_devices[GX_DEVICE_SD].mounted)
|
||||
{
|
||||
chdir("sd:/");
|
||||
|
Loading…
Reference in New Issue
Block a user