add a fallback for cases when an autoconf is present but it doesn't have descriptors

This commit is contained in:
radius 2016-02-15 22:48:35 -05:00
parent 17f616e3dc
commit e97de06f24
2 changed files with 4 additions and 4 deletions

View File

@ -394,7 +394,7 @@ static void input_config_get_bind_string_joykey(char *buf, const char *prefix,
&& settings->input.input_descriptor_label_show)
snprintf(buf, size, "%s %s ", prefix, bind->joykey_label);
else
snprintf(buf, size, "%sHat #%u %s ", prefix,
snprintf(buf, size, "%sHat #%u %s (N/A)", prefix,
(unsigned)GET_HAT(bind->joykey), dir);
}
else
@ -403,7 +403,7 @@ static void input_config_get_bind_string_joykey(char *buf, const char *prefix,
&& settings->input.input_descriptor_label_show)
snprintf(buf, size, "%s%s (btn) ", prefix, bind->joykey_label);
else
snprintf(buf, size, "%s%u (btn) ", prefix, (unsigned)bind->joykey);
snprintf(buf, size, "%s%u (btn)(N/A) ", prefix, (unsigned)bind->joykey);
}
}
@ -428,7 +428,7 @@ static void input_config_get_bind_string_joyaxis(char *buf, const char *prefix,
&& settings->input.input_descriptor_label_show)
snprintf(buf, size, "%s%s (axis) ", prefix, bind->joyaxis_label);
else
snprintf(buf, size, "%s%c%u (axis) ", prefix, dir, axis);
snprintf(buf, size, "%s%c%u (axis)(N/A) ", prefix, dir, axis);
}
void input_config_get_bind_string(char *buf, const struct retro_keybind *bind,

View File

@ -403,7 +403,7 @@ static void menu_action_setting_disp_set_label_input_desc(
if (inp_desc_button_index_offset < RARCH_FIRST_CUSTOM_BIND)
{
if(strstr(descriptor,"Auto"))
if(strstr(descriptor,"Auto") && !strstr(descriptor,"(N/A)"))
strlcpy(s,
descriptor,
len);