mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-24 08:30:16 +00:00
Move menu_common_load_content to menu.c
This commit is contained in:
parent
8596de7716
commit
098e6b0e9b
16
menu/menu.c
16
menu/menu.c
@ -50,7 +50,7 @@ static void menu_environment_get(int *argc, char *argv[],
|
||||
wrap_args->touched = true;
|
||||
}
|
||||
|
||||
static void push_to_history_playlist(void)
|
||||
static void menu_push_to_history_playlist(void)
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
global_t *global = global_get_ptr();
|
||||
@ -118,7 +118,7 @@ bool menu_load_content(void)
|
||||
event_command(EVENT_CMD_HISTORY_INIT);
|
||||
|
||||
if (*global->fullpath || (menu && menu->load_no_content))
|
||||
push_to_history_playlist();
|
||||
menu_push_to_history_playlist();
|
||||
|
||||
event_command(EVENT_CMD_VIDEO_SET_ASPECT_RATIO);
|
||||
event_command(EVENT_CMD_RESUME);
|
||||
@ -126,6 +126,18 @@ bool menu_load_content(void)
|
||||
return true;
|
||||
}
|
||||
|
||||
void menu_common_load_content(bool persist)
|
||||
{
|
||||
menu_handle_t *menu = menu_driver_get_ptr();
|
||||
if (!menu)
|
||||
return;
|
||||
|
||||
event_command(persist ? EVENT_CMD_LOAD_CONTENT_PERSIST : EVENT_CMD_LOAD_CONTENT);
|
||||
|
||||
menu_list_flush_stack(menu->menu_list, NULL, MENU_SETTINGS);
|
||||
menu->msg_force = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* menu_init:
|
||||
* @data : Menu context handle.
|
||||
|
@ -188,6 +188,8 @@ void menu_free(menu_handle_t *menu);
|
||||
**/
|
||||
bool menu_load_content(void);
|
||||
|
||||
void menu_common_load_content(bool persist);
|
||||
|
||||
void menu_update_system_info(menu_handle_t *menu, bool *load_no_content);
|
||||
|
||||
int menu_do_refresh(unsigned action);
|
||||
|
@ -30,18 +30,6 @@
|
||||
|
||||
#include <rhash.h>
|
||||
|
||||
void menu_entries_common_load_content(bool persist)
|
||||
{
|
||||
menu_handle_t *menu = menu_driver_get_ptr();
|
||||
if (!menu)
|
||||
return;
|
||||
|
||||
event_command(persist ? EVENT_CMD_LOAD_CONTENT_PERSIST : EVENT_CMD_LOAD_CONTENT);
|
||||
|
||||
menu_list_flush_stack(menu->menu_list, NULL, MENU_SETTINGS);
|
||||
menu->msg_force = true;
|
||||
}
|
||||
|
||||
#if 0
|
||||
#define DEBUG_LOG
|
||||
#endif
|
||||
|
@ -43,8 +43,6 @@ int action_right_cheat(unsigned type, const char *label,
|
||||
bool wraparound);
|
||||
/* End of function callbacks */
|
||||
|
||||
void menu_entries_common_load_content(bool persist);
|
||||
|
||||
int menu_entries_cbs_init_bind_left(menu_file_list_cbs_t *cbs,
|
||||
const char *path, const char *label, unsigned type, size_t idx,
|
||||
const char *elem0, const char *elem1, const char *menu_label,
|
||||
|
@ -100,7 +100,7 @@ static int archive_load(void)
|
||||
{
|
||||
case -1:
|
||||
event_command(EVENT_CMD_LOAD_CORE);
|
||||
menu_entries_common_load_content(false);
|
||||
menu_common_load_content(false);
|
||||
break;
|
||||
case 0:
|
||||
info.list = menu->menu_list->menu_stack;
|
||||
|
@ -87,7 +87,7 @@ static int action_ok_file_load_with_detect_core(const char *path,
|
||||
return menu_displaylist_push_list(&info, DISPLAYLIST_GENERIC);
|
||||
default:
|
||||
event_command(EVENT_CMD_LOAD_CORE);
|
||||
menu_entries_common_load_content(false);
|
||||
menu_common_load_content(false);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
@ -129,7 +129,7 @@ static int action_ok_file_load_detect_core(const char *path,
|
||||
strlcpy(global->fullpath, detect_content_path, sizeof(global->fullpath));
|
||||
strlcpy(settings->libretro, path, sizeof(settings->libretro));
|
||||
event_command(EVENT_CMD_LOAD_CORE);
|
||||
menu_entries_common_load_content(false);
|
||||
menu_common_load_content(false);
|
||||
|
||||
return -1;
|
||||
}
|
||||
@ -874,7 +874,7 @@ static int action_ok_core_load_deferred(const char *path,
|
||||
strlcpy(global->fullpath, menu->deferred_path,
|
||||
sizeof(global->fullpath));
|
||||
|
||||
menu_entries_common_load_content(false);
|
||||
menu_common_load_content(false);
|
||||
|
||||
return -1;
|
||||
}
|
||||
@ -939,7 +939,7 @@ static int action_ok_core_load(const char *path,
|
||||
{
|
||||
*global->fullpath = '\0';
|
||||
|
||||
menu_entries_common_load_content(false);
|
||||
menu_common_load_content(false);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -1131,7 +1131,7 @@ static int action_ok_file_load(const char *path,
|
||||
fill_pathname_join(global->fullpath, menu_path, path,
|
||||
sizeof(global->fullpath));
|
||||
|
||||
menu_entries_common_load_content(true);
|
||||
menu_common_load_content(true);
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user