From 575e7b36abb09d2f3ee1ebd60b54c25e8871dc8f Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 4 Sep 2016 23:23:54 +0200 Subject: [PATCH] Start using menu_popup_push_pending --- menu/cbs/menu_cbs_ok.c | 4 ++-- menu/menu_driver.c | 7 +++---- menu/menu_popup.h | 5 +++++ 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/menu/cbs/menu_cbs_ok.c b/menu/cbs/menu_cbs_ok.c index 2004a19630..5aae177453 100644 --- a/menu/cbs/menu_cbs_ok.c +++ b/menu/cbs/menu_cbs_ok.c @@ -27,6 +27,7 @@ #include "../menu_setting.h" #include "../menu_shader.h" #include "../menu_navigation.h" +#include "../menu_popup.h" #include "../menu_content.h" #include "../../configuration.h" @@ -240,8 +241,7 @@ int generic_action_ok_displaylist_push(const char *path, break; case ACTION_OK_DL_HELP: info_label = label; - menu->help_screen.type = type; - menu->help_screen.push = true; + menu_popup_push_pending(menu, true, type); dl_type = DISPLAYLIST_HELP; break; case ACTION_OK_DL_RPL_ENTRY: diff --git a/menu/menu_driver.c b/menu/menu_driver.c index d78349dcf6..45758a05c0 100644 --- a/menu/menu_driver.c +++ b/menu/menu_driver.c @@ -24,6 +24,7 @@ #include "menu_cbs.h" #include "menu_display.h" #include "menu_navigation.h" +#include "menu_popup.h" #include "menu_shader.h" #include "../config.def.h" @@ -171,8 +172,7 @@ static bool menu_init(menu_handle_t *menu_data) if (settings->menu_show_start_screen) { - menu_data->help_screen.push = true; - menu_data->help_screen.type = MENU_HELP_WELCOME; + menu_popup_push_pending(menu_data, true, MENU_HELP_WELCOME); settings->menu_show_start_screen = false; command_event(CMD_EVENT_MENU_SAVE_CURRENT_CONFIG, NULL); } @@ -188,8 +188,7 @@ static bool menu_init(menu_handle_t *menu_data) #endif ) { - menu_data->help_screen.type = MENU_HELP_EXTRACT; - menu_data->help_screen.push = true; + menu_popup_push_pending(menu_data, true, MENU_HELP_EXTRACT); #ifdef HAVE_ZLIB task_push_decompress(settings->path.bundle_assets_src, settings->path.bundle_assets_dst, diff --git a/menu/menu_popup.h b/menu/menu_popup.h index 898dd01460..6287d75a32 100644 --- a/menu/menu_popup.h +++ b/menu/menu_popup.h @@ -20,10 +20,15 @@ #include #include +#include + #include RETRO_BEGIN_DECLS +void menu_popup_push_pending(menu_handle_t *menu, + bool push, enum menu_help_type type); + int menu_popup_iterate_help(menu_handle_t *menu, char *s, size_t len, const char *label);