Use just one label descriptor setting

This commit is contained in:
twinaphex 2015-11-07 16:11:30 +01:00
parent 92e6b56fe3
commit 9bb87f276c
13 changed files with 10 additions and 56 deletions

View File

@ -600,7 +600,6 @@ static void config_set_defaults(void)
*settings->cheevos.password = '\0'; *settings->cheevos.password = '\0';
#endif #endif
settings->input.autoconfig_descriptor_label_show = true;
settings->input.back_as_menu_toggle_enable = true; settings->input.back_as_menu_toggle_enable = true;
settings->input.input_descriptor_label_show = input_descriptor_label_show; settings->input.input_descriptor_label_show = input_descriptor_label_show;
settings->input.input_descriptor_hide_unbound = input_descriptor_hide_unbound; settings->input.input_descriptor_hide_unbound = input_descriptor_hide_unbound;
@ -1411,7 +1410,6 @@ static bool config_load_file(const char *path, bool set_defaults)
CONFIG_GET_INT_BASE(conf, settings, input.menu_toggle_gamepad_combo, "input_menu_toggle_gamepad_combo"); CONFIG_GET_INT_BASE(conf, settings, input.menu_toggle_gamepad_combo, "input_menu_toggle_gamepad_combo");
CONFIG_GET_BOOL_BASE(conf, settings, input.input_descriptor_label_show, "input_descriptor_label_show"); CONFIG_GET_BOOL_BASE(conf, settings, input.input_descriptor_label_show, "input_descriptor_label_show");
CONFIG_GET_BOOL_BASE(conf, settings, input.input_descriptor_hide_unbound, "input_descriptor_hide_unbound"); CONFIG_GET_BOOL_BASE(conf, settings, input.input_descriptor_hide_unbound, "input_descriptor_hide_unbound");
CONFIG_GET_BOOL_BASE(conf, settings, input.autoconfig_descriptor_label_show, "autoconfig_descriptor_label_show");
CONFIG_GET_BOOL_BASE(conf, settings, ui.companion_start_on_boot, "ui_companion_start_on_boot"); CONFIG_GET_BOOL_BASE(conf, settings, ui.companion_start_on_boot, "ui_companion_start_on_boot");
@ -2447,8 +2445,6 @@ bool config_save_file(const char *path)
settings->input.netplay_client_swap_input); settings->input.netplay_client_swap_input);
config_set_bool(conf, "input_descriptor_label_show", config_set_bool(conf, "input_descriptor_label_show",
settings->input.input_descriptor_label_show); settings->input.input_descriptor_label_show);
config_set_bool(conf, "autoconfig_descriptor_label_show",
settings->input.autoconfig_descriptor_label_show);
config_set_bool(conf, "input_descriptor_hide_unbound", config_set_bool(conf, "input_descriptor_hide_unbound",
settings->input.input_descriptor_hide_unbound); settings->input.input_descriptor_hide_unbound);
config_set_bool(conf, "load_dummy_on_core_shutdown", config_set_bool(conf, "load_dummy_on_core_shutdown",

View File

@ -243,7 +243,6 @@ typedef struct settings
float overlay_scale; float overlay_scale;
char autoconfig_dir[PATH_MAX_LENGTH]; char autoconfig_dir[PATH_MAX_LENGTH];
bool autoconfig_descriptor_label_show;
bool input_descriptor_label_show; bool input_descriptor_label_show;
bool input_descriptor_hide_unbound; bool input_descriptor_hide_unbound;

View File

@ -368,7 +368,7 @@ static void input_get_bind_string_joykey(char *buf, const char *prefix,
break; break;
} }
if (bind->joykey_label[0] != '\0' && settings->input.autoconfig_descriptor_label_show) if (bind->joykey_label[0] != '\0' && settings->input.input_descriptor_label_show)
snprintf(buf, size, "%s %s ", prefix, bind->joykey_label); snprintf(buf, size, "%s %s ", prefix, bind->joykey_label);
else else
snprintf(buf, size, "%sHat #%u %s ", prefix, snprintf(buf, size, "%sHat #%u %s ", prefix,
@ -376,7 +376,7 @@ static void input_get_bind_string_joykey(char *buf, const char *prefix,
} }
else else
{ {
if (bind->joykey_label[0] != '\0' && settings->input.autoconfig_descriptor_label_show) if (bind->joykey_label[0] != '\0' && settings->input.input_descriptor_label_show)
snprintf(buf, size, "%s%s (btn) ", prefix, bind->joykey_label); snprintf(buf, size, "%s%s (btn) ", prefix, bind->joykey_label);
else else
snprintf(buf, size, "%s%u (btn) ", prefix, (unsigned)bind->joykey); snprintf(buf, size, "%s%u (btn) ", prefix, (unsigned)bind->joykey);
@ -400,7 +400,7 @@ static void input_get_bind_string_joyaxis(char *buf, const char *prefix,
dir = '+'; dir = '+';
axis = AXIS_POS_GET(bind->joyaxis); axis = AXIS_POS_GET(bind->joyaxis);
} }
if (bind->joyaxis_label[0] != '\0' && settings->input.autoconfig_descriptor_label_show) if (bind->joyaxis_label[0] != '\0' && settings->input.input_descriptor_label_show)
snprintf(buf, size, "%s%s (axis) ", prefix, bind->joyaxis_label); snprintf(buf, size, "%s%s (axis) ", prefix, bind->joyaxis_label);
else else
snprintf(buf, size, "%s%c%u (axis) ", prefix, dir, axis); snprintf(buf, size, "%s%c%u (axis) ", prefix, dir, axis);

View File

@ -89,9 +89,7 @@ const char *menu_hash_to_str_de(uint32_t hash)
return "RetroKeyboard"; return "RetroKeyboard";
case MENU_LABEL_VALUE_AUDIO_BLOCK_FRAMES: case MENU_LABEL_VALUE_AUDIO_BLOCK_FRAMES:
return "Warte auf Audio-Frames"; return "Warte auf Audio-Frames";
case MENU_LABEL_VALUE_AUTOCONFIG_DESCRIPTOR_LABEL_SHOW: case MENU_LABEL_VALUE_INPUT_DESCRIPTOR_LABEL_SHOW: /* TODO/FIXME */
return "Zeige Autoconfig-Beschriftungen";
case MENU_LABEL_VALUE_INPUT_DESCRIPTOR_LABEL_SHOW:
return "Zeige Core-Eingabe-Beschriftungen"; return "Zeige Core-Eingabe-Beschriftungen";
case MENU_LABEL_VALUE_INPUT_DESCRIPTOR_HIDE_UNBOUND: case MENU_LABEL_VALUE_INPUT_DESCRIPTOR_HIDE_UNBOUND:
return "Verstecke unzugewiesene Core-Eingabe-Beschriftungen"; return "Verstecke unzugewiesene Core-Eingabe-Beschriftungen";

View File

@ -146,9 +146,7 @@ const char *menu_hash_to_str_es(uint32_t hash)
return "RetroKeyboard"; return "RetroKeyboard";
case MENU_LABEL_VALUE_AUDIO_BLOCK_FRAMES: case MENU_LABEL_VALUE_AUDIO_BLOCK_FRAMES:
return "Bloquear fotogramas"; return "Bloquear fotogramas";
case MENU_LABEL_VALUE_AUTOCONFIG_DESCRIPTOR_LABEL_SHOW: case MENU_LABEL_VALUE_INPUT_DESCRIPTOR_LABEL_SHOW: /* TODO/FIXME */
return "Mostrar etiquetas de descripción del autoconfigurado";
case MENU_LABEL_VALUE_INPUT_DESCRIPTOR_LABEL_SHOW:
return "Mostrar etiquetas de descripción de la entrada del núcleo"; return "Mostrar etiquetas de descripción de la entrada del núcleo";
case MENU_LABEL_VALUE_INPUT_DESCRIPTOR_HIDE_UNBOUND: case MENU_LABEL_VALUE_INPUT_DESCRIPTOR_HIDE_UNBOUND:
return "Ocultar descripciones sin asignar de la entrada del núcleo"; return "Ocultar descripciones sin asignar de la entrada del núcleo";

View File

@ -102,16 +102,8 @@ const char *menu_hash_to_str_fr(uint32_t hash)
return "audio_block_frames"; return "audio_block_frames";
case MENU_LABEL_VALUE_AUDIO_BLOCK_FRAMES: case MENU_LABEL_VALUE_AUDIO_BLOCK_FRAMES:
return "Block Frames"; return "Block Frames";
case MENU_LABEL_AUTOCONFIG_DESCRIPTOR_LABEL_SHOW: case MENU_LABEL_VALUE_INPUT_DESCRIPTOR_LABEL_SHOW: /* FIXME/UPDATE */
return "autoconfig_descriptor_label_show";
case MENU_LABEL_VALUE_AUTOCONFIG_DESCRIPTOR_LABEL_SHOW:
return "Display Autoconfig Descriptor Labels";
case MENU_LABEL_INPUT_DESCRIPTOR_LABEL_SHOW:
return "input_descriptor_label_show";
case MENU_LABEL_VALUE_INPUT_DESCRIPTOR_LABEL_SHOW:
return "Afficher les remaps du coeur"; return "Afficher les remaps du coeur";
case MENU_LABEL_INPUT_DESCRIPTOR_HIDE_UNBOUND:
return "input_descriptor_hide_unbound";
case MENU_LABEL_VALUE_INPUT_DESCRIPTOR_HIDE_UNBOUND: case MENU_LABEL_VALUE_INPUT_DESCRIPTOR_HIDE_UNBOUND:
return "Cacher les remaps non mappés des coeurs"; return "Cacher les remaps non mappés des coeurs";
case MENU_LABEL_VALUE_VIDEO_FONT_ENABLE: case MENU_LABEL_VALUE_VIDEO_FONT_ENABLE:

View File

@ -135,10 +135,8 @@ const char *menu_hash_to_str_nl(uint32_t hash)
return "RetroKeyboard"; return "RetroKeyboard";
case MENU_LABEL_VALUE_AUDIO_BLOCK_FRAMES: case MENU_LABEL_VALUE_AUDIO_BLOCK_FRAMES:
return "Block Frames"; return "Block Frames";
case MENU_LABEL_VALUE_AUTOCONFIG_DESCRIPTOR_LABEL_SHOW:
return "Autoconfig Descriptie Labels Weergeven";
case MENU_LABEL_VALUE_INPUT_DESCRIPTOR_LABEL_SHOW: case MENU_LABEL_VALUE_INPUT_DESCRIPTOR_LABEL_SHOW:
return "Core Input Descriptie Labels Weergeven"; return "Descriptie Labels Weergeven";
case MENU_LABEL_VALUE_INPUT_DESCRIPTOR_HIDE_UNBOUND: case MENU_LABEL_VALUE_INPUT_DESCRIPTOR_HIDE_UNBOUND:
return "Verbergen Niet-gemapte Core Input Descripties"; return "Verbergen Niet-gemapte Core Input Descripties";
case MENU_LABEL_VALUE_VIDEO_FONT_ENABLE: case MENU_LABEL_VALUE_VIDEO_FONT_ENABLE:

View File

@ -99,10 +99,8 @@ const char *menu_hash_to_str_pl(uint32_t hash)
return "RetroKeyboard"; return "RetroKeyboard";
case MENU_LABEL_VALUE_AUDIO_BLOCK_FRAMES: case MENU_LABEL_VALUE_AUDIO_BLOCK_FRAMES:
return "Block Frames"; return "Block Frames";
case MENU_LABEL_VALUE_AUTOCONFIG_DESCRIPTOR_LABEL_SHOW:
return "Wyświetl opisy przycisków autokonfiguracji";
case MENU_LABEL_VALUE_INPUT_DESCRIPTOR_LABEL_SHOW: case MENU_LABEL_VALUE_INPUT_DESCRIPTOR_LABEL_SHOW:
return "Wyświetl opisy przycisków dla tego rdzenia"; return "Wyświetl opisy przycisków dla tego rdzenia"; /* UPDATE/FIXME */
case MENU_LABEL_VALUE_INPUT_DESCRIPTOR_HIDE_UNBOUND: case MENU_LABEL_VALUE_INPUT_DESCRIPTOR_HIDE_UNBOUND:
return "Ukryj nieprzypisane przyciski"; return "Ukryj nieprzypisane przyciski";
case MENU_LABEL_VALUE_VIDEO_FONT_ENABLE: case MENU_LABEL_VALUE_VIDEO_FONT_ENABLE:

View File

@ -89,8 +89,6 @@ const char *menu_hash_to_str_pt(uint32_t hash)
return "RetroTeclado"; return "RetroTeclado";
case MENU_LABEL_VALUE_AUDIO_BLOCK_FRAMES: case MENU_LABEL_VALUE_AUDIO_BLOCK_FRAMES:
return "Quadros de Blocos de Áudio"; return "Quadros de Blocos de Áudio";
case MENU_LABEL_VALUE_AUTOCONFIG_DESCRIPTOR_LABEL_SHOW:
return "Mostrar Rótulos de Autoconfiguração";
case MENU_LABEL_VALUE_INPUT_DESCRIPTOR_LABEL_SHOW: case MENU_LABEL_VALUE_INPUT_DESCRIPTOR_LABEL_SHOW:
return "Mostrar Rótulos de Entradas de Core"; return "Mostrar Rótulos de Entradas de Core";
case MENU_LABEL_VALUE_INPUT_DESCRIPTOR_HIDE_UNBOUND: case MENU_LABEL_VALUE_INPUT_DESCRIPTOR_HIDE_UNBOUND:

View File

@ -138,8 +138,6 @@ static const char *menu_hash_to_str_us_label(uint32_t hash)
return "audio_block_frames"; return "audio_block_frames";
case MENU_LABEL_INPUT_BIND_MODE: case MENU_LABEL_INPUT_BIND_MODE:
return "input_bind_mode"; return "input_bind_mode";
case MENU_LABEL_AUTOCONFIG_DESCRIPTOR_LABEL_SHOW:
return "autoconfig_descriptor_label_show";
case MENU_LABEL_INPUT_DESCRIPTOR_LABEL_SHOW: case MENU_LABEL_INPUT_DESCRIPTOR_LABEL_SHOW:
return "input_descriptor_label_show"; return "input_descriptor_label_show";
case MENU_LABEL_INPUT_DESCRIPTOR_HIDE_UNBOUND: case MENU_LABEL_INPUT_DESCRIPTOR_HIDE_UNBOUND:
@ -822,10 +820,8 @@ const char *menu_hash_to_str_us(uint32_t hash)
return "Block Frames"; return "Block Frames";
case MENU_LABEL_VALUE_INPUT_BIND_MODE: case MENU_LABEL_VALUE_INPUT_BIND_MODE:
return "Bind Mode"; return "Bind Mode";
case MENU_LABEL_VALUE_AUTOCONFIG_DESCRIPTOR_LABEL_SHOW:
return "Display Autoconfig Descriptor Labels";
case MENU_LABEL_VALUE_INPUT_DESCRIPTOR_LABEL_SHOW: case MENU_LABEL_VALUE_INPUT_DESCRIPTOR_LABEL_SHOW:
return "Display Core Input Descriptor Labels"; return "Display Input Descriptor Labels";
case MENU_LABEL_VALUE_INPUT_DESCRIPTOR_HIDE_UNBOUND: case MENU_LABEL_VALUE_INPUT_DESCRIPTOR_HIDE_UNBOUND:
return "Hide Unbound Core Input Descriptors"; return "Hide Unbound Core Input Descriptors";
case MENU_LABEL_VALUE_VIDEO_FONT_ENABLE: case MENU_LABEL_VALUE_VIDEO_FONT_ENABLE:

View File

@ -2608,8 +2608,6 @@ int menu_displaylist_push_list(menu_displaylist_info_t *info, unsigned type)
menu_hash_to_str(MENU_LABEL_INPUT_REMAP_BINDS_ENABLE), PARSE_ONLY_BOOL, false); menu_hash_to_str(MENU_LABEL_INPUT_REMAP_BINDS_ENABLE), PARSE_ONLY_BOOL, false);
ret = menu_displaylist_parse_settings(menu, info, ret = menu_displaylist_parse_settings(menu, info,
menu_hash_to_str(MENU_LABEL_INPUT_AUTODETECT_ENABLE), PARSE_ONLY_BOOL, false); menu_hash_to_str(MENU_LABEL_INPUT_AUTODETECT_ENABLE), PARSE_ONLY_BOOL, false);
ret = menu_displaylist_parse_settings(menu, info,
menu_hash_to_str(MENU_LABEL_AUTOCONFIG_DESCRIPTOR_LABEL_SHOW), PARSE_ONLY_BOOL, false);
ret = menu_displaylist_parse_settings(menu, info, ret = menu_displaylist_parse_settings(menu, info,
menu_hash_to_str(MENU_LABEL_INPUT_DESCRIPTOR_LABEL_SHOW), PARSE_ONLY_BOOL, false); menu_hash_to_str(MENU_LABEL_INPUT_DESCRIPTOR_LABEL_SHOW), PARSE_ONLY_BOOL, false);
ret = menu_displaylist_parse_settings(menu, info, ret = menu_displaylist_parse_settings(menu, info,

View File

@ -615,9 +615,6 @@ extern "C" {
#define MENU_LABEL_INPUT_DESCRIPTOR_LABEL_SHOW 0x7eefdf52U #define MENU_LABEL_INPUT_DESCRIPTOR_LABEL_SHOW 0x7eefdf52U
#define MENU_LABEL_VALUE_INPUT_DESCRIPTOR_LABEL_SHOW 0x78d0ea06U #define MENU_LABEL_VALUE_INPUT_DESCRIPTOR_LABEL_SHOW 0x78d0ea06U
#define MENU_LABEL_AUTOCONFIG_DESCRIPTOR_LABEL_SHOW 0xde1d9571U
#define MENU_LABEL_VALUE_AUTOCONFIG_DESCRIPTOR_LABEL_SHOW 0x2748a1bcU
#define MENU_LABEL_INPUT_DESCRIPTOR_HIDE_UNBOUND 0x7051d870U #define MENU_LABEL_INPUT_DESCRIPTOR_HIDE_UNBOUND 0x7051d870U
#define MENU_LABEL_VALUE_INPUT_DESCRIPTOR_HIDE_UNBOUND 0xc26ddec5U #define MENU_LABEL_VALUE_INPUT_DESCRIPTOR_HIDE_UNBOUND 0xc26ddec5U

View File

@ -4976,25 +4976,11 @@ static bool setting_append_list_input_options(
general_write_handler, general_write_handler,
general_read_handler); general_read_handler);
CONFIG_BOOL(
settings->input.autoconfig_descriptor_label_show,
menu_hash_to_str(MENU_LABEL_AUTOCONFIG_DESCRIPTOR_LABEL_SHOW),
menu_hash_to_str(MENU_LABEL_VALUE_AUTOCONFIG_DESCRIPTOR_LABEL_SHOW),
true,
menu_hash_to_str(MENU_VALUE_OFF),
menu_hash_to_str(MENU_VALUE_ON),
group_info.name,
subgroup_info.name,
parent_group,
general_write_handler,
general_read_handler);
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ADVANCED);
CONFIG_BOOL( CONFIG_BOOL(
settings->input.input_descriptor_label_show, settings->input.input_descriptor_label_show,
menu_hash_to_str(MENU_LABEL_INPUT_DESCRIPTOR_LABEL_SHOW), menu_hash_to_str(MENU_LABEL_INPUT_DESCRIPTOR_LABEL_SHOW),
menu_hash_to_str(MENU_LABEL_VALUE_INPUT_DESCRIPTOR_LABEL_SHOW), menu_hash_to_str(MENU_LABEL_VALUE_INPUT_DESCRIPTOR_LABEL_SHOW),
input_descriptor_label_show, true,
menu_hash_to_str(MENU_VALUE_OFF), menu_hash_to_str(MENU_VALUE_OFF),
menu_hash_to_str(MENU_VALUE_ON), menu_hash_to_str(MENU_VALUE_ON),
group_info.name, group_info.name,