mirror of
https://github.com/libretro/RetroArch
synced 2025-03-02 19:13:34 +00:00
add a fallback for cases when an autoconf is present but it doesn't have descriptors
This commit is contained in:
parent
17f616e3dc
commit
e97de06f24
@ -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,
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user