mirror of
https://github.com/libretro/RetroArch
synced 2025-04-23 11:43:20 +00:00
Fix .cfg not found with external loaders.
This commit is contained in:
parent
99e5791ae4
commit
b5eedbaed7
@ -209,7 +209,21 @@ static void frontend_gx_get_environment_settings(
|
|||||||
chdir("carda:/retroarch");
|
chdir("carda:/retroarch");
|
||||||
#endif
|
#endif
|
||||||
getcwd(g_defaults.dirs[DEFAULT_DIR_CORE], PATH_MAX_LENGTH);
|
getcwd(g_defaults.dirs[DEFAULT_DIR_CORE], PATH_MAX_LENGTH);
|
||||||
|
#if defined(HW_RVL) && !defined(IS_SALAMANDER)
|
||||||
|
/* When using external loaders(Wiiflow etc.), getcwd doesn't return the path correctly and
|
||||||
|
* as a result the cfg file is not found. */
|
||||||
|
if (*argc > 2 && argv[1] != NULL && argv[2] != NULL)
|
||||||
|
{
|
||||||
|
if(gx_devices[GX_DEVICE_SD].mounted)
|
||||||
|
{
|
||||||
|
chdir("sd:/");
|
||||||
|
}
|
||||||
|
else if(gx_devices[GX_DEVICE_USB].mounted)
|
||||||
|
{
|
||||||
|
chdir("usb:/");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
last_slash = strrchr(g_defaults.dirs[DEFAULT_DIR_CORE], '/');
|
last_slash = strrchr(g_defaults.dirs[DEFAULT_DIR_CORE], '/');
|
||||||
if (last_slash)
|
if (last_slash)
|
||||||
*last_slash = 0;
|
*last_slash = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user