Have menu_common_load_content return int
This commit is contained in:
parent
47936965e6
commit
4c41cadf22
|
@ -422,9 +422,7 @@ static int rarch_defer_core_wrapper(size_t idx, size_t entry_idx, const char *pa
|
||||||
{
|
{
|
||||||
case -1:
|
case -1:
|
||||||
event_command(EVENT_CMD_LOAD_CORE);
|
event_command(EVENT_CMD_LOAD_CORE);
|
||||||
menu_common_load_content(false, CORE_TYPE_PLAIN);
|
return menu_common_load_content(false, CORE_TYPE_PLAIN);
|
||||||
ret = -1;
|
|
||||||
break;
|
|
||||||
case 0:
|
case 0:
|
||||||
ret = generic_action_ok_displaylist_push(path,
|
ret = generic_action_ok_displaylist_push(path,
|
||||||
NULL, 0, idx, entry_idx, ACTION_OK_DL_DEFERRED_CORE_LIST);
|
NULL, 0, idx, entry_idx, ACTION_OK_DL_DEFERRED_CORE_LIST);
|
||||||
|
@ -463,9 +461,7 @@ static int action_ok_file_load_detect_core(const char *path,
|
||||||
strlcpy(global->path.fullpath, detect_content_path, sizeof(global->path.fullpath));
|
strlcpy(global->path.fullpath, detect_content_path, sizeof(global->path.fullpath));
|
||||||
strlcpy(settings->libretro, path, sizeof(settings->libretro));
|
strlcpy(settings->libretro, path, sizeof(settings->libretro));
|
||||||
event_command(EVENT_CMD_LOAD_CORE);
|
event_command(EVENT_CMD_LOAD_CORE);
|
||||||
menu_common_load_content(false, CORE_TYPE_PLAIN);
|
return menu_common_load_content(false, CORE_TYPE_PLAIN);
|
||||||
|
|
||||||
return -1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -858,9 +854,7 @@ static int action_ok_core_load_deferred(const char *path,
|
||||||
strlcpy(global->path.fullpath, menu->deferred_path,
|
strlcpy(global->path.fullpath, menu->deferred_path,
|
||||||
sizeof(global->path.fullpath));
|
sizeof(global->path.fullpath));
|
||||||
|
|
||||||
menu_common_load_content(false, CORE_TYPE_PLAIN);
|
return menu_common_load_content(false, CORE_TYPE_PLAIN);
|
||||||
|
|
||||||
return -1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int action_ok_database_manager_list_deferred(const char *path,
|
static int action_ok_database_manager_list_deferred(const char *path,
|
||||||
|
@ -904,9 +898,7 @@ static int action_ok_core_load(const char *path,
|
||||||
if (menu->load_no_content && settings->core.set_supports_no_game_enable)
|
if (menu->load_no_content && settings->core.set_supports_no_game_enable)
|
||||||
{
|
{
|
||||||
*global->path.fullpath = '\0';
|
*global->path.fullpath = '\0';
|
||||||
|
return menu_common_load_content(false, CORE_TYPE_PLAIN);
|
||||||
menu_common_load_content(false, CORE_TYPE_PLAIN);
|
|
||||||
return -1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Core selection on non-console just updates directory listing.
|
/* Core selection on non-console just updates directory listing.
|
||||||
|
@ -1055,9 +1047,7 @@ static int action_ok_file_load(const char *path,
|
||||||
fill_pathname_join(global->path.fullpath, menu_path_new, path,
|
fill_pathname_join(global->path.fullpath, menu_path_new, path,
|
||||||
sizeof(global->path.fullpath));
|
sizeof(global->path.fullpath));
|
||||||
|
|
||||||
menu_common_load_content(true, CORE_TYPE_PLAIN);
|
return menu_common_load_content(true, CORE_TYPE_PLAIN);
|
||||||
|
|
||||||
return -1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -1690,8 +1680,7 @@ static int action_ok_load_archive_detect_core(const char *path,
|
||||||
{
|
{
|
||||||
case -1:
|
case -1:
|
||||||
event_command(EVENT_CMD_LOAD_CORE);
|
event_command(EVENT_CMD_LOAD_CORE);
|
||||||
menu_common_load_content(false, CORE_TYPE_PLAIN);
|
return menu_common_load_content(false, CORE_TYPE_PLAIN);
|
||||||
break;
|
|
||||||
case 0:
|
case 0:
|
||||||
ret = generic_action_ok_displaylist_push(path, label, type,
|
ret = generic_action_ok_displaylist_push(path, label, type,
|
||||||
selected, entry_idx, ACTION_OK_DL_DEFERRED_CORE_LIST);
|
selected, entry_idx, ACTION_OK_DL_DEFERRED_CORE_LIST);
|
||||||
|
|
|
@ -149,12 +149,10 @@ void menu_common_push_content_settings(void)
|
||||||
menu_displaylist_push_list(&info, DISPLAYLIST_CONTENT_SETTINGS);
|
menu_displaylist_push_list(&info, DISPLAYLIST_CONTENT_SETTINGS);
|
||||||
}
|
}
|
||||||
|
|
||||||
void menu_common_load_content(bool persist, enum rarch_core_type type)
|
int menu_common_load_content(bool persist, enum rarch_core_type type)
|
||||||
{
|
{
|
||||||
menu_display_t *disp = menu_display_get_ptr();
|
menu_display_t *disp = menu_display_get_ptr();
|
||||||
menu_list_t *menu_list = menu_list_get_ptr();
|
menu_list_t *menu_list = menu_list_get_ptr();
|
||||||
if (!menu_list)
|
|
||||||
return;
|
|
||||||
|
|
||||||
switch (type)
|
switch (type)
|
||||||
{
|
{
|
||||||
|
@ -178,6 +176,8 @@ void menu_common_load_content(bool persist, enum rarch_core_type type)
|
||||||
disp->msg_force = true;
|
disp->msg_force = true;
|
||||||
|
|
||||||
menu_common_push_content_settings();
|
menu_common_push_content_settings();
|
||||||
|
|
||||||
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -195,7 +195,7 @@ void menu_free(menu_handle_t *menu);
|
||||||
**/
|
**/
|
||||||
bool menu_load_content(enum rarch_core_type type);
|
bool menu_load_content(enum rarch_core_type type);
|
||||||
|
|
||||||
void menu_common_load_content(bool persist, enum rarch_core_type type);
|
int menu_common_load_content(bool persist, enum rarch_core_type type);
|
||||||
|
|
||||||
void menu_common_push_content_settings(void);
|
void menu_common_push_content_settings(void);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue