mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-21 18:28:31 +00:00
Only set CORE_TYPE_PLAIN for non-directory -L.
Fixes crash on Android startup which uses -L <core-dir> CLI argument. -L can also set core directory, even though it's not supposed to be used anymore. Also, on Android, the cores directory might not be populated, so ignore arguments which are not valid.
This commit is contained in:
parent
23c8150b6e
commit
b96d365968
12
retroarch.c
12
retroarch.c
@ -829,14 +829,20 @@ static void parse_input(int argc, char *argv[])
|
||||
"Setting libretro_directory to \"%s\" instead.\n",
|
||||
optarg);
|
||||
}
|
||||
else
|
||||
else if (path_file_exists(optarg))
|
||||
{
|
||||
runloop_ctl(RUNLOOP_CTL_SET_LIBRETRO_PATH, optarg);
|
||||
global->has_set.libretro = true;
|
||||
|
||||
/* We requested explicit core, so use PLAIN core type. */
|
||||
current_core_type = CORE_TYPE_PLAIN;
|
||||
}
|
||||
else
|
||||
{
|
||||
RARCH_WARN("--libretro argument \"%s\" is neither a file nor directory. Ignoring.\n",
|
||||
optarg);
|
||||
}
|
||||
|
||||
/* We requested explicit core, so use PLAIN core type. */
|
||||
current_core_type = CORE_TYPE_PLAIN;
|
||||
break;
|
||||
#endif
|
||||
case 'P':
|
||||
|
Loading…
Reference in New Issue
Block a user