mirror of
https://github.com/libretro/RetroArch.git
synced 2025-01-22 01:07:37 +00:00
(RARCH_CONSOLE) Remove rarch_default_libretro_keybind_name_lut
This commit is contained in:
parent
17022672fc
commit
d67e96c603
@ -29,25 +29,6 @@ struct platform_bind
|
||||
const char *label;
|
||||
};
|
||||
|
||||
char rarch_default_libretro_keybind_name_lut[RARCH_FIRST_META_KEY][32] = {
|
||||
"RetroPad Button B", /* RETRO_DEVICE_ID_JOYPAD_B */
|
||||
"RetroPad Button Y", /* RETRO_DEVICE_ID_JOYPAD_Y */
|
||||
"RetroPad Button Select", /* RETRO_DEVICE_ID_JOYPAD_SELECT */
|
||||
"RetroPad Button Start", /* RETRO_DEVICE_ID_JOYPAD_START */
|
||||
"RetroPad D-Pad Up", /* RETRO_DEVICE_ID_JOYPAD_UP */
|
||||
"RetroPad D-Pad Down", /* RETRO_DEVICE_ID_JOYPAD_DOWN */
|
||||
"RetroPad D-Pad Left", /* RETRO_DEVICE_ID_JOYPAD_LEFT */
|
||||
"RetroPad D-Pad Right", /* RETRO_DEVICE_ID_JOYPAD_RIGHT */
|
||||
"RetroPad Button A", /* RETRO_DEVICE_ID_JOYPAD_A */
|
||||
"RetroPad Button X", /* RETRO_DEVICE_ID_JOYPAD_X */
|
||||
"RetroPad Button L1", /* RETRO_DEVICE_ID_JOYPAD_L */
|
||||
"RetroPad Button R1", /* RETRO_DEVICE_ID_JOYPAD_R */
|
||||
"RetroPad Button L2", /* RETRO_DEVICE_ID_JOYPAD_L2 */
|
||||
"RetroPad Button R2", /* RETRO_DEVICE_ID_JOYPAD_R2 */
|
||||
"RetroPad Button L3", /* RETRO_DEVICE_ID_JOYPAD_L3 */
|
||||
"RetroPad Button R3", /* RETRO_DEVICE_ID_JOYPAD_R3 */
|
||||
};
|
||||
|
||||
extern const struct platform_bind platform_keys[];
|
||||
extern const unsigned int platform_keys_size;
|
||||
|
||||
@ -104,7 +85,6 @@ const char *rarch_input_find_platform_key_label(uint64_t joykey)
|
||||
return "Unknown";
|
||||
}
|
||||
|
||||
|
||||
void rarch_input_set_keybind(unsigned player, unsigned keybind_action, uint64_t default_retro_joypad_id)
|
||||
{
|
||||
uint64_t *key = &g_settings.input.binds[player][default_retro_joypad_id].joykey;
|
||||
@ -137,8 +117,3 @@ void rarch_input_set_default_keybinds(unsigned player)
|
||||
}
|
||||
g_settings.input.dpad_emulation[player] = DPAD_EMULATION_LSTICK;
|
||||
}
|
||||
|
||||
const char *rarch_input_get_default_keybind_name(unsigned id)
|
||||
{
|
||||
return rarch_default_libretro_keybind_name_lut[id];
|
||||
}
|
||||
|
@ -27,11 +27,8 @@ enum keybind_set_id
|
||||
KEYBIND_DEFAULT
|
||||
};
|
||||
|
||||
extern char rarch_default_libretro_keybind_name_lut[RARCH_FIRST_META_KEY][32];
|
||||
|
||||
const char *rarch_input_find_platform_key_label(uint64_t joykey);
|
||||
void rarch_input_set_default_keybinds(unsigned player);
|
||||
void rarch_input_set_keybind(unsigned player, unsigned keybind_action, uint64_t default_retro_joypad_id);
|
||||
const char *rarch_input_get_default_keybind_name (unsigned id);
|
||||
|
||||
#endif
|
||||
|
@ -602,9 +602,9 @@ static void populate_setting_item(void *data, unsigned input)
|
||||
case SETTING_CONTROLS_RETRO_DEVICE_ID_JOYPAD_L3:
|
||||
case SETTING_CONTROLS_RETRO_DEVICE_ID_JOYPAD_R3:
|
||||
{
|
||||
const char * value = rarch_input_find_platform_key_label(g_settings.input.binds[currently_selected_controller_menu][currentsetting-(FIRST_CONTROL_BIND)].joykey);
|
||||
unsigned id = currentsetting - FIRST_CONTROL_BIND;
|
||||
snprintf(current_item->text, sizeof(current_item->text), rarch_input_get_default_keybind_name(id));
|
||||
const char * value = rarch_input_find_platform_key_label(g_settings.input.binds[currently_selected_controller_menu][id].joykey);
|
||||
snprintf(current_item->text, sizeof(current_item->text), g_settings.input.binds[currently_selected_controller_menu][id].desc);
|
||||
snprintf(current_item->comment, sizeof(current_item->comment), "INFO - [%s] is mapped to action:\n[%s].", current_item->text, value);
|
||||
snprintf(current_item->setting_text, sizeof(current_item->setting_text), value);
|
||||
}
|
||||
|
@ -413,7 +413,7 @@ HRESULT CRetroArchControls::OnInit(XUIMessageInit * pInitData, BOOL& bHandled)
|
||||
for(i = 0; i < RARCH_FIRST_META_KEY; i++)
|
||||
{
|
||||
snprintf(buttons[i], sizeof(buttons[i]), "%s #%d: %s",
|
||||
rarch_input_get_default_keybind_name(i), controlno,
|
||||
g_settings.input.binds[controlno][i].desc, controlno,
|
||||
rarch_input_find_platform_key_label(g_settings.input.binds[controlno][i].joykey));
|
||||
convert_char_to_wchar(strw_buffer, buttons[i], sizeof(strw_buffer));
|
||||
m_controlslist.SetText(i, strw_buffer);
|
||||
@ -440,7 +440,7 @@ HRESULT CRetroArchControls::OnControlNavigate(
|
||||
for(i = 0; i < RARCH_FIRST_META_KEY; i++)
|
||||
{
|
||||
snprintf(buttons[i], sizeof(buttons[i]), "%s #%d: %s",
|
||||
rarch_input_get_default_keybind_name(i), controlno,
|
||||
g_settings.input.binds[controlno][i].desc, controlno,
|
||||
rarch_input_find_platform_key_label(g_settings.input.binds[controlno][i].joykey));
|
||||
convert_char_to_wchar(strw_buffer, buttons[i], sizeof(strw_buffer));
|
||||
m_controlslist.SetText(i, strw_buffer);
|
||||
@ -468,7 +468,9 @@ HRESULT CRetroArchControls::OnControlNavigate(
|
||||
break;
|
||||
default:
|
||||
rarch_input_set_keybind(controlno, KEYBIND_DECREMENT, current_index);
|
||||
snprintf(button, sizeof(button), "%s #%d: %s", rarch_input_get_default_keybind_name(current_index), controlno, rarch_input_find_platform_key_label(g_settings.input.binds[controlno][current_index].joykey));
|
||||
snprintf(button, sizeof(button), "%s #%d: %s",
|
||||
g_settings.input.binds[controlno][current_index].desc, controlno,
|
||||
rarch_input_find_platform_key_label(g_settings.input.binds[controlno][current_index].joykey));
|
||||
convert_char_to_wchar(strw_buffer, button, sizeof(strw_buffer));
|
||||
m_controlslist.SetText(current_index, strw_buffer);
|
||||
break;
|
||||
@ -494,7 +496,9 @@ HRESULT CRetroArchControls::OnControlNavigate(
|
||||
break;
|
||||
default:
|
||||
rarch_input_set_keybind(controlno, KEYBIND_INCREMENT, current_index);
|
||||
snprintf(button, sizeof(button), "%s #%d: %s", rarch_input_get_default_keybind_name(current_index), controlno, rarch_input_find_platform_key_label(g_settings.input.binds[controlno][current_index].joykey));
|
||||
snprintf(button, sizeof(button), "%s #%d: %s",
|
||||
g_settings.input.binds[controlno][current_index].desc, controlno,
|
||||
rarch_input_find_platform_key_label(g_settings.input.binds[controlno][current_index].joykey));
|
||||
convert_char_to_wchar(strw_buffer, button, sizeof(strw_buffer));
|
||||
m_controlslist.SetText(current_index, strw_buffer);
|
||||
break;
|
||||
@ -535,7 +539,7 @@ HRESULT CRetroArchControls::OnNotifyPress( HXUIOBJ hObjPressed, int & bHandled
|
||||
for(i = 0; i < RARCH_FIRST_META_KEY; i++)
|
||||
{
|
||||
snprintf(buttons[i], sizeof(buttons[i]), "%s #%d: %s",
|
||||
rarch_input_get_default_keybind_name(i), controlno,
|
||||
g_settings.input.binds[controlno][i].desc, controlno,
|
||||
rarch_input_find_platform_key_label(
|
||||
g_settings.input.binds[controlno][i].joykey));
|
||||
convert_char_to_wchar(strw_buffer, buttons[i], sizeof(strw_buffer));
|
||||
@ -544,7 +548,9 @@ HRESULT CRetroArchControls::OnNotifyPress( HXUIOBJ hObjPressed, int & bHandled
|
||||
break;
|
||||
default:
|
||||
rarch_input_set_keybind(controlno, KEYBIND_DEFAULT, current_index);
|
||||
snprintf(buttons[current_index], sizeof(buttons[current_index]), "%s #%d: %s", rarch_input_get_default_keybind_name(current_index), controlno, rarch_input_find_platform_key_label(g_settings.input.binds[controlno][current_index].joykey));
|
||||
snprintf(buttons[current_index], sizeof(buttons[current_index]), "%s #%d: %s",
|
||||
g_settings.input.binds[controlno][current_index].desc, controlno,
|
||||
rarch_input_find_platform_key_label(g_settings.input.binds[controlno][current_index].joykey));
|
||||
convert_char_to_wchar(strw_buffer, buttons[current_index], sizeof(strw_buffer));
|
||||
m_controlslist.SetText(current_index, strw_buffer);
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user