mirror of
https://github.com/libretro/RetroArch
synced 2025-03-02 19:13:34 +00:00
Show "---" for unbound controls, not "(Key: )"
This commit is contained in:
parent
fe7b12f274
commit
b3a53ac8ca
@ -2511,10 +2511,17 @@ void input_config_get_bind_string(char *buf, const struct retro_keybind *bind,
|
|||||||
input_keymaps_translate_rk_to_str(bind->key, key, sizeof(key));
|
input_keymaps_translate_rk_to_str(bind->key, key, sizeof(key));
|
||||||
if (string_is_equal(key, file_path_str(FILE_PATH_NUL)))
|
if (string_is_equal(key, file_path_str(FILE_PATH_NUL)))
|
||||||
*key = '\0';
|
*key = '\0';
|
||||||
|
/*empty?*/
|
||||||
snprintf(keybuf, sizeof(keybuf), msg_hash_to_str(MENU_ENUM_LABEL_VALUE_INPUT_KEY), key);
|
if ( *key != '\0' ) {
|
||||||
strlcat(buf, keybuf, size);
|
snprintf(keybuf, sizeof(keybuf), msg_hash_to_str(MENU_ENUM_LABEL_VALUE_INPUT_KEY), key);
|
||||||
|
strlcat(buf, keybuf, size);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/*completely empty?*/
|
||||||
|
if ( *buf == '\0' ) {
|
||||||
|
strlcat(buf, "---", size);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *input_config_get_device_name(unsigned port)
|
const char *input_config_get_device_name(unsigned port)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user