mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-01-20 18:02:12 +00:00
(Deferred core) Fix direct loading of deferred core
This commit is contained in:
parent
ca9fd4bc81
commit
0f12c67054
@ -1787,19 +1787,12 @@ static int menu_action_ok(const char *dir,
|
||||
else if (!strcmp(menu_label, "detect_core_list")
|
||||
&& type == MENU_FILE_PLAIN)
|
||||
{
|
||||
const core_info_t *info = NULL;
|
||||
int ret = rarch_defer_core(info, g_extern.core_info,
|
||||
int ret = rarch_defer_core(g_extern.core_info,
|
||||
dir, path, driver.menu->deferred_path,
|
||||
sizeof(driver.menu->deferred_path));
|
||||
|
||||
if (ret == -1)
|
||||
{
|
||||
strlcpy(g_extern.fullpath, driver.menu->deferred_path,
|
||||
sizeof(g_extern.fullpath));
|
||||
|
||||
if (path_file_exists(info->path))
|
||||
strlcpy(g_settings.libretro, info->path,
|
||||
sizeof(g_settings.libretro));
|
||||
|
||||
rarch_main_command(RARCH_CMD_LOAD_CONTENT);
|
||||
rarch_main_command(RARCH_CMD_LOAD_CORE);
|
||||
|
@ -814,7 +814,7 @@ bool rarch_set_rumble_state(unsigned port,
|
||||
void rarch_playlist_load_content(content_playlist_t *playlist,
|
||||
unsigned index);
|
||||
|
||||
int rarch_defer_core(const core_info_t *info, core_info_list_t *data,
|
||||
int rarch_defer_core(core_info_list_t *data,
|
||||
const char *dir, const char *path, char *deferred_path,
|
||||
size_t sizeof_deferred_path);
|
||||
|
||||
|
12
retroarch.c
12
retroarch.c
@ -3772,10 +3772,10 @@ void rarch_main_init_wrap(const struct rarch_main_wrap *args,
|
||||
/* When selection is presented back, returns 0.
|
||||
* If it can make a decision right now, returns -1. */
|
||||
|
||||
int rarch_defer_core(const core_info_t *info,
|
||||
core_info_list_t *core_info, const char *dir,
|
||||
int rarch_defer_core(core_info_list_t *core_info, const char *dir,
|
||||
const char *path, char *deferred_path, size_t sizeof_deferred_path)
|
||||
{
|
||||
const core_info_t *info = NULL;
|
||||
size_t supported = 0;
|
||||
|
||||
fill_pathname_join(deferred_path, dir, path, sizeof_deferred_path);
|
||||
@ -3786,7 +3786,15 @@ int rarch_defer_core(const core_info_t *info,
|
||||
|
||||
/* Can make a decision right now. */
|
||||
if (supported == 1)
|
||||
{
|
||||
strlcpy(g_extern.fullpath, deferred_path,
|
||||
sizeof(g_extern.fullpath));
|
||||
|
||||
if (path_file_exists(info->path))
|
||||
strlcpy(g_settings.libretro, info->path,
|
||||
sizeof(g_settings.libretro));
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user