mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-23 11:18:25 +00:00
Create struct for help_screen
This commit is contained in:
parent
88bf19bff4
commit
36092d8033
@ -240,7 +240,7 @@ int generic_action_ok_displaylist_push(const char *path,
|
||||
break;
|
||||
case ACTION_OK_DL_HELP:
|
||||
info_label = label;
|
||||
menu->push_help_screen = true;
|
||||
menu->help_screen.push = true;
|
||||
dl_type = DISPLAYLIST_HELP;
|
||||
break;
|
||||
case ACTION_OK_DL_RPL_ENTRY:
|
||||
@ -1447,7 +1447,7 @@ static int generic_action_ok_help(const char *path,
|
||||
menu_handle_t *menu = NULL;
|
||||
|
||||
menu_driver_ctl(RARCH_MENU_CTL_DRIVER_DATA_GET, &menu);
|
||||
menu->help_screen_type = id2;
|
||||
menu->help_screen.type = id2;
|
||||
|
||||
return generic_action_ok_displaylist_push(path, NULL, lbl, type, idx,
|
||||
entry_idx, ACTION_OK_DL_HELP);
|
||||
@ -1461,7 +1461,7 @@ static int action_ok_cheevos(const char *path,
|
||||
|
||||
menu_driver_ctl(RARCH_MENU_CTL_DRIVER_DATA_GET, &menu);
|
||||
|
||||
menu->help_screen_id = new_id;
|
||||
menu->help_screen.id = new_id;
|
||||
return generic_action_ok_help(path, label, type, idx, entry_idx,
|
||||
MENU_ENUM_LABEL_CHEEVOS_DESCRIPTION,
|
||||
MENU_HELP_CHEEVOS_DESCRIPTION);
|
||||
|
@ -44,7 +44,7 @@ static int action_iterate_help(menu_handle_t *menu,
|
||||
bool do_exit = false;
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
switch (menu->help_screen_type)
|
||||
switch (menu->help_screen.type)
|
||||
{
|
||||
case MENU_HELP_WELCOME:
|
||||
{
|
||||
@ -176,7 +176,7 @@ static int action_iterate_help(menu_handle_t *menu,
|
||||
|
||||
#ifdef HAVE_CHEEVOS
|
||||
case MENU_HELP_CHEEVOS_DESCRIPTION:
|
||||
desc_info.idx = menu->help_screen_id;
|
||||
desc_info.idx = menu->help_screen.id;
|
||||
desc_info.s = s;
|
||||
desc_info.len = len;
|
||||
cheevos_get_description(&desc_info);
|
||||
@ -222,7 +222,7 @@ static int action_iterate_help(menu_handle_t *menu,
|
||||
|
||||
if (do_exit)
|
||||
{
|
||||
menu->help_screen_type = MENU_HELP_NONE;
|
||||
menu->help_screen.type = MENU_HELP_NONE;
|
||||
return 1;
|
||||
}
|
||||
|
||||
@ -429,7 +429,7 @@ int generic_menu_iterate(void *data, void *userdata, enum menu_action action)
|
||||
BIT64_SET(menu->state, MENU_STATE_POST_ITERATE);
|
||||
|
||||
/* Have to defer it so we let settings refresh. */
|
||||
if (menu->push_help_screen)
|
||||
if (menu->help_screen.push)
|
||||
{
|
||||
menu_displaylist_info_t info = {0};
|
||||
file_list_t *menu_stack = menu_entries_get_menu_stack_ptr(0);
|
||||
|
@ -4177,7 +4177,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data)
|
||||
case DISPLAYLIST_HELP:
|
||||
menu_entries_append_enum(info->list, info->path,
|
||||
info->label, MSG_UNKNOWN, info->type, info->directory_ptr, 0);
|
||||
menu->push_help_screen = false;
|
||||
menu->help_screen.push = false;
|
||||
break;
|
||||
case DISPLAYLIST_SETTING_ENUM:
|
||||
{
|
||||
|
@ -171,8 +171,8 @@ static bool menu_init(menu_handle_t *menu_data)
|
||||
|
||||
if (settings->menu_show_start_screen)
|
||||
{
|
||||
menu_data->push_help_screen = true;
|
||||
menu_data->help_screen_type = MENU_HELP_WELCOME;
|
||||
menu_data->help_screen.push = true;
|
||||
menu_data->help_screen.type = MENU_HELP_WELCOME;
|
||||
settings->menu_show_start_screen = false;
|
||||
command_event(CMD_EVENT_MENU_SAVE_CURRENT_CONFIG, NULL);
|
||||
}
|
||||
@ -181,15 +181,15 @@ static bool menu_init(menu_handle_t *menu_data)
|
||||
&& !string_is_empty(settings->path.bundle_assets_src)
|
||||
&& !string_is_empty(settings->path.bundle_assets_dst)
|
||||
#ifdef IOS
|
||||
&& menu_data->push_help_screen
|
||||
&& menu_data->help_screen.push
|
||||
#else
|
||||
&& (settings->bundle_assets_extract_version_current
|
||||
!= settings->bundle_assets_extract_last_version)
|
||||
#endif
|
||||
)
|
||||
{
|
||||
menu_data->help_screen_type = MENU_HELP_EXTRACT;
|
||||
menu_data->push_help_screen = true;
|
||||
menu_data->help_screen.type = MENU_HELP_EXTRACT;
|
||||
menu_data->help_screen.push = true;
|
||||
#ifdef HAVE_ZLIB
|
||||
task_push_decompress(settings->path.bundle_assets_src,
|
||||
settings->path.bundle_assets_dst,
|
||||
|
@ -233,9 +233,12 @@ enum menu_settings_type
|
||||
|
||||
typedef struct
|
||||
{
|
||||
bool push_help_screen;
|
||||
unsigned help_screen_id;
|
||||
enum menu_help_type help_screen_type;
|
||||
struct
|
||||
{
|
||||
bool push;
|
||||
unsigned id;
|
||||
enum menu_help_type type;
|
||||
} help_screen;
|
||||
|
||||
char deferred_path[PATH_MAX_LENGTH];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user