This commit is contained in:
twinaphex 2018-02-06 00:10:40 +01:00
parent cef20c4135
commit 410188ce90
3 changed files with 20 additions and 18 deletions

View File

@ -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;
}

View File

@ -16,6 +16,7 @@
#include <compat/strl.h>
#include <file/file_path.h>
#include <lists/string_list.h>
#include <string/stdstring.h>
#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)

View File

@ -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