void input_config_get_bind_string(char *buf, const struct retro_keybind *bind, const struct retro_keybind *auto_bind, size_t size) { char key[64] = {0}; char keybuf[64] = {0}; (void)key; (void)keybuf; *buf = '\0'; if (bind->joykey != NO_BTN) input_config_get_bind_string_joykey(buf, "", bind, size); else if (bind->joyaxis != AXIS_NONE) input_config_get_bind_string_joyaxis(buf, "", bind, size); else if (auto_bind && auto_bind->joykey != NO_BTN) input_config_get_bind_string_joykey(buf, "Auto: ", auto_bind, size); else if (auto_bind && auto_bind->joyaxis != AXIS_NONE) input_config_get_bind_string_joyaxis(buf, "Auto: ", auto_bind, size); #ifndef RARCH_CONSOLE input_keymaps_translate_rk_to_str(bind->key, key, sizeof(key)); if (string_is_equal(key, "nul")) *key = '\0'; snprintf(keybuf, sizeof(keybuf), "(Key: %s)", key); strlcat(buf, keybuf, size); #endif }
void input_config_get_bind_string(char *buf, const struct retro_keybind *bind, const struct retro_keybind *auto_bind, size_t size) { #ifndef RARCH_CONSOLE char key[64]; char keybuf[64]; key[0] = keybuf[0] = '\0'; #endif *buf = '\0'; if (bind->joykey != NO_BTN) input_config_get_bind_string_joykey(buf, "", bind, size); else if (bind->joyaxis != AXIS_NONE) input_config_get_bind_string_joyaxis(buf, "", bind, size); else if (auto_bind && auto_bind->joykey != NO_BTN) input_config_get_bind_string_joykey(buf, "Auto: ", auto_bind, size); else if (auto_bind && auto_bind->joyaxis != AXIS_NONE) input_config_get_bind_string_joyaxis(buf, "Auto: ", auto_bind, size); #ifndef RARCH_CONSOLE input_keymaps_translate_rk_to_str(bind->key, key, sizeof(key)); if (string_is_equal(key, file_path_str(FILE_PATH_NUL))) *key = '\0'; snprintf(keybuf, sizeof(keybuf), msg_hash_to_str(MENU_ENUM_LABEL_VALUE_INPUT_KEY), key); strlcat(buf, keybuf, size); #endif }