mirror of
https://github.com/libretro/RetroArch
synced 2025-03-30 16:20:27 +00:00
Fix 'load content' - upon loading ZIP files, should no longer show
'deferred core list'
This commit is contained in:
parent
03aa4dd20c
commit
344ae2575a
18
general.c
18
general.c
@ -96,8 +96,10 @@ void rarch_main_init_wrap(const struct rarch_main_wrap *args,
|
||||
* If it can make a decision right now, returns -1. */
|
||||
|
||||
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 char *path, const char *menu_label,
|
||||
char *deferred_path, size_t sizeof_deferred_path)
|
||||
{
|
||||
char new_core_path[PATH_MAX];
|
||||
const core_info_t *info = NULL;
|
||||
size_t supported = 0;
|
||||
|
||||
@ -117,13 +119,23 @@ int rarch_defer_core(core_info_list_t *core_info, const char *dir,
|
||||
core_info_list_get_supported_cores(core_info, deferred_path, &info,
|
||||
&supported);
|
||||
|
||||
if (!strcmp(menu_label, "load_content"))
|
||||
{
|
||||
strlcpy(new_core_path, g_extern.core_info_current->path, sizeof(new_core_path));
|
||||
supported = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
strlcpy(new_core_path, info->path, sizeof(new_core_path));
|
||||
}
|
||||
|
||||
/* 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,
|
||||
if (path_file_exists(new_core_path))
|
||||
strlcpy(g_settings.libretro, new_core_path,
|
||||
sizeof(g_settings.libretro));
|
||||
return -1;
|
||||
}
|
||||
|
@ -859,8 +859,8 @@ void rarch_playlist_load_content(content_playlist_t *playlist,
|
||||
unsigned index);
|
||||
|
||||
int rarch_defer_core(core_info_list_t *data,
|
||||
const char *dir, const char *path, char *deferred_path,
|
||||
size_t sizeof_deferred_path);
|
||||
const char *dir, const char *path, const char *menu_label,
|
||||
char *deferred_path, size_t sizeof_deferred_path);
|
||||
|
||||
void rarch_update_system_info(struct retro_system_info *info,
|
||||
bool *load_no_content);
|
||||
|
@ -470,7 +470,7 @@ static int menu_archive_load(void)
|
||||
menu_list_get_at_offset(driver.menu->menu_list->selection_buf,
|
||||
driver.menu->selection_ptr, &path, NULL, &type);
|
||||
|
||||
ret = rarch_defer_core(g_extern.core_info, menu_path, path,
|
||||
ret = rarch_defer_core(g_extern.core_info, menu_path, path, menu_label,
|
||||
driver.menu->deferred_path, sizeof(driver.menu->deferred_path));
|
||||
|
||||
switch (ret)
|
||||
|
@ -583,7 +583,7 @@ static int action_ok_file_load_with_detect_core(const char *path,
|
||||
&menu_path, NULL, NULL);
|
||||
|
||||
ret = rarch_defer_core(g_extern.core_info,
|
||||
menu_path, path, driver.menu->deferred_path,
|
||||
menu_path, path, label, driver.menu->deferred_path,
|
||||
sizeof(driver.menu->deferred_path));
|
||||
|
||||
if (ret == -1)
|
||||
|
Loading…
x
Reference in New Issue
Block a user