From 410188ce901e35db1f6ba947c7913c74fbf0f719 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Tue, 6 Feb 2018 00:10:40 +0100 Subject: [PATCH] Cleanups --- menu/cbs/menu_cbs_ok.c | 16 ++++++++++------ menu/cbs/menu_cbs_start.c | 16 ++++++++++------ msg_hash.h | 6 ------ 3 files changed, 20 insertions(+), 18 deletions(-) diff --git a/menu/cbs/menu_cbs_ok.c b/menu/cbs/menu_cbs_ok.c index 7ad19c177b..374b457efa 100644 --- a/menu/cbs/menu_cbs_ok.c +++ b/menu/cbs/menu_cbs_ok.c @@ -3874,6 +3874,16 @@ static int menu_cbs_init_bind_ok_compare_label(menu_file_list_cbs_t *cbs, BIND_ACTION_OK(cbs, action_ok_push_downloads_dir); return 0; } + else if (string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_ACCOUNTS_RETRO_ACHIEVEMENTS))) + { + BIND_ACTION_OK(cbs, action_ok_push_accounts_cheevos_list); + return 0; + } + else if (string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_SCREEN_RESOLUTION))) + { + BIND_ACTION_OK(cbs, action_ok_video_resolution); + return 0; + } else if (cbs->enum_idx != MSG_UNKNOWN) { switch (cbs->enum_idx) @@ -4302,9 +4312,6 @@ static int menu_cbs_init_bind_ok_compare_label(menu_file_list_cbs_t *cbs, case MENU_LABEL_REMAP_FILE_LOAD: BIND_ACTION_OK(cbs, action_ok_remap_file); break; - case MENU_LABEL_ACCOUNTS_RETRO_ACHIEVEMENTS: - BIND_ACTION_OK(cbs, action_ok_push_accounts_cheevos_list); - break; case MENU_LABEL_DETECT_CORE_LIST_OK: BIND_ACTION_OK(cbs, action_ok_file_load_detect_core); break; @@ -4314,9 +4321,6 @@ static int menu_cbs_init_bind_ok_compare_label(menu_file_list_cbs_t *cbs, case MENU_LABEL_REMAP_FILE_SAVE_GAME: BIND_ACTION_OK(cbs, action_ok_remap_file_save_game); break; - case MENU_LABEL_SCREEN_RESOLUTION: - BIND_ACTION_OK(cbs, action_ok_video_resolution); - break; default: return -1; } diff --git a/menu/cbs/menu_cbs_start.c b/menu/cbs/menu_cbs_start.c index 84f028c2ce..e573cbbbd4 100644 --- a/menu/cbs/menu_cbs_start.c +++ b/menu/cbs/menu_cbs_start.c @@ -16,6 +16,7 @@ #include #include #include +#include #ifdef HAVE_CONFIG_H #include "../../config.h" @@ -274,8 +275,15 @@ static int action_start_lookup_setting(unsigned type, const char *label) return menu_setting_set(type, label, MENU_ACTION_START, false); } -static int menu_cbs_init_bind_start_compare_label(menu_file_list_cbs_t *cbs) +static int menu_cbs_init_bind_start_compare_label(menu_file_list_cbs_t *cbs, + const char *label) { + if (string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_SCREEN_RESOLUTION))) + { + BIND_ACTION_START(cbs, action_start_video_resolution); + return 0; + } + if (cbs->enum_idx != MSG_UNKNOWN) { switch (cbs->enum_idx) @@ -354,10 +362,6 @@ static int menu_cbs_init_bind_start_compare_type(menu_file_list_cbs_t *cbs, { BIND_ACTION_START(cbs, action_start_core_setting); } - else if (type == MENU_LABEL_SCREEN_RESOLUTION) - { - BIND_ACTION_START(cbs, action_start_video_resolution); - } else return -1; @@ -372,7 +376,7 @@ int menu_cbs_init_bind_start(menu_file_list_cbs_t *cbs, BIND_ACTION_START(cbs, action_start_lookup_setting); - if (menu_cbs_init_bind_start_compare_label(cbs) == 0) + if (menu_cbs_init_bind_start_compare_label(cbs, label) == 0) return 0; if (menu_cbs_init_bind_start_compare_type(cbs, type) == 0) diff --git a/msg_hash.h b/msg_hash.h index c1a41e85bd..fef1017aeb 100644 --- a/msg_hash.h +++ b/msg_hash.h @@ -1781,12 +1781,6 @@ enum msg_hash_enums #define MENU_LABEL_DEFERRED_CONFIGURATIONS_LIST 0x679a1b0bU #define MENU_LABEL_DEFERRED_BROWSE_URL_START 0xcef58296U -/* Accounts settings */ -#define MENU_LABEL_ACCOUNTS_RETRO_ACHIEVEMENTS 0xe6b7c16cU - -/* Information settings */ -#define MENU_LABEL_SCREEN_RESOLUTION 0x5c9b3a58U - /* Directory settings */ #define MENU_LABEL_CURSOR_DIRECTORY 0xdee8d377U