From bea4f8aad3c112585f47e900714b81a9aa56587e Mon Sep 17 00:00:00 2001 From: twinaphex Date: Wed, 4 Mar 2020 22:21:18 +0100 Subject: [PATCH] (menu_dialog.c) Cleanups --- menu/menu_driver.c | 6 +----- menu/widgets/menu_dialog.c | 14 +------------- menu/widgets/menu_dialog.h | 6 +----- retroarch.c | 5 ----- 4 files changed, 3 insertions(+), 28 deletions(-) diff --git a/menu/menu_driver.c b/menu/menu_driver.c index 4cdd2ef624..ed8e15c17c 100644 --- a/menu/menu_driver.c +++ b/menu/menu_driver.c @@ -148,7 +148,7 @@ static int generic_menu_iterate(void *data, { case ITERATE_TYPE_HELP: ret = menu_dialog_iterate( - menu->menu_state_msg, sizeof(menu->menu_state_msg), label, + menu->menu_state_msg, sizeof(menu->menu_state_msg), current_time); #ifdef HAVE_ACCESSIBILITY @@ -168,10 +168,7 @@ static int generic_menu_iterate(void *data, pop_stack = true; if (pop_stack) - { BIT64_SET(menu->state, MENU_STATE_POP_STACK); - menu_dialog_set_active(false); - } } break; case ITERATE_TYPE_BIND: @@ -302,7 +299,6 @@ static int generic_menu_iterate(void *data, { BIT64_SET(menu->state, MENU_STATE_POP_STACK); } - menu_dialog_set_active(false); break; case ITERATE_TYPE_DEFAULT: { diff --git a/menu/widgets/menu_dialog.c b/menu/widgets/menu_dialog.c index 1f0260e8fa..04fecfe0b5 100644 --- a/menu/widgets/menu_dialog.c +++ b/menu/widgets/menu_dialog.c @@ -35,12 +35,11 @@ #include "../../performance_counters.h" static bool menu_dialog_pending_push = false; -static bool menu_dialog_active = false; static unsigned menu_dialog_current_id = 0; static enum menu_dialog_type menu_dialog_current_type = MENU_DIALOG_NONE; static enum msg_hash_enums menu_dialog_current_msg = MSG_UNKNOWN; -int menu_dialog_iterate(char *s, size_t len, const char *label, +int menu_dialog_iterate(char *s, size_t len, retro_time_t current_time) { #ifdef HAVE_CHEEVOS @@ -258,7 +257,6 @@ bool menu_dialog_push_pending(bool push, enum menu_dialog_type type) #endif menu_dialog_pending_push = push; menu_dialog_current_type = type; - menu_dialog_active = true; return true; } @@ -296,13 +294,3 @@ void menu_dialog_reset(void) menu_dialog_current_type = MENU_DIALOG_NONE; menu_dialog_current_msg = MSG_UNKNOWN; } - -void menu_dialog_set_active(bool on) -{ - menu_dialog_active = on; -} - -enum menu_dialog_type menu_dialog_get_current_type(void) -{ - return menu_dialog_current_type; -} diff --git a/menu/widgets/menu_dialog.h b/menu/widgets/menu_dialog.h index 0fe84f90fe..0ce8c588ec 100644 --- a/menu/widgets/menu_dialog.h +++ b/menu/widgets/menu_dialog.h @@ -54,7 +54,7 @@ bool menu_dialog_push_pending( bool push, enum menu_dialog_type type); int menu_dialog_iterate( - char *s, size_t len, const char *label, + char *s, size_t len, retro_time_t current_time); void menu_dialog_unset_pending_push(void); @@ -65,10 +65,6 @@ void menu_dialog_reset(void); void menu_dialog_set_current_id(unsigned id); -void menu_dialog_set_active(bool on); - -enum menu_dialog_type menu_dialog_get_current_type(void); - RETRO_END_DECLS #endif diff --git a/retroarch.c b/retroarch.c index 850bda62ff..d1438eb152 100644 --- a/retroarch.c +++ b/retroarch.c @@ -16861,12 +16861,7 @@ static void menu_input_pointer_close_messagebox(void) string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_HELP_AUDIO_VIDEO_TROUBLESHOOTING)) || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_HELP_SEND_DEBUG_INFO)) || string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_CHEEVOS_DESCRIPTION))) - { - /* Have to set this to false, apparently... - * (c.f. generic_menu_iterate()) */ - menu_dialog_set_active(false); pop_stack = true; - } /* Pop stack, if required */ if (pop_stack)