mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-01-24 04:04:29 +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");
|
||||
#endif
|
||||
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], '/');
|
||||
if (last_slash)
|
||||
*last_slash = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user