mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-24 00:20:01 +00:00
add menu setting and fix for keyboard
This commit is contained in:
parent
a99a9c0810
commit
53ab0cdb55
@ -817,14 +817,23 @@ uint64_t input_menu_keys_pressed(void)
|
||||
if (menu_input_dialog_get_display_kb())
|
||||
return ret;
|
||||
|
||||
|
||||
if (current_input->input_state(current_input_data, binds, 0,
|
||||
RETRO_DEVICE_KEYBOARD, 0, RETROK_RETURN))
|
||||
BIT64_SET(ret, RETRO_DEVICE_ID_JOYPAD_A);
|
||||
{
|
||||
if (!settings->input.menu_swap_ok_cancel_buttons)
|
||||
BIT64_SET(ret, RETRO_DEVICE_ID_JOYPAD_A);
|
||||
else
|
||||
BIT64_SET(ret, RETRO_DEVICE_ID_JOYPAD_B);
|
||||
}
|
||||
|
||||
if (current_input->input_state(current_input_data, binds, 0,
|
||||
RETRO_DEVICE_KEYBOARD, 0, RETROK_BACKSPACE))
|
||||
BIT64_SET(ret, RETRO_DEVICE_ID_JOYPAD_B);
|
||||
{
|
||||
if (!settings->input.menu_swap_ok_cancel_buttons)
|
||||
BIT64_SET(ret, RETRO_DEVICE_ID_JOYPAD_B);
|
||||
else
|
||||
BIT64_SET(ret, RETRO_DEVICE_ID_JOYPAD_A);
|
||||
}
|
||||
|
||||
if (current_input->input_state(current_input_data, binds, 0,
|
||||
RETRO_DEVICE_KEYBOARD, 0, RETROK_SPACE))
|
||||
|
@ -408,6 +408,8 @@ MSG_HASH(MENU_ENUM_LABEL_INFO_SCREEN,
|
||||
"info_screen")
|
||||
MSG_HASH(MENU_ENUM_LABEL_INPUT_ALL_USERS_CONTROL_MENU,
|
||||
"all_users_control_menu")
|
||||
MSG_HASH(MENU_ENUM_LABEL_MENU_INPUT_SWAP_OK_CANCEL,
|
||||
"menu_swap_ok_cancel")
|
||||
MSG_HASH(MENU_ENUM_LABEL_INPUT_AUTODETECT_ENABLE,
|
||||
"input_autodetect_enable")
|
||||
MSG_HASH(MENU_ENUM_LABEL_INPUT_AXIS_THRESHOLD,
|
||||
|
@ -612,6 +612,8 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_AUTODETECT_ENABLE,
|
||||
"Autoconfig Enable")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_AXIS_THRESHOLD,
|
||||
"Analog Stick Deadzone")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_INPUT_SWAP_OK_CANCEL,
|
||||
"Menu Swap Ok & Cancel Buttons")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_BACK_AS_MENU_ENUM_TOGGLE_ENABLE,
|
||||
"Back As Menu Toggle Enable")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_BIND_ALL,
|
||||
|
@ -5317,6 +5317,8 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data)
|
||||
#endif
|
||||
ret = menu_displaylist_parse_settings_enum(menu, info,
|
||||
MENU_ENUM_LABEL_INPUT_MENU_ENUM_TOGGLE_GAMEPAD_COMBO, PARSE_ONLY_UINT, false);
|
||||
ret = menu_displaylist_parse_settings_enum(menu, info,
|
||||
MENU_ENUM_LABEL_MENU_INPUT_SWAP_OK_CANCEL, PARSE_ONLY_BOOL, false);
|
||||
ret = menu_displaylist_parse_settings_enum(menu, info,
|
||||
MENU_ENUM_LABEL_INPUT_ALL_USERS_CONTROL_MENU, PARSE_ONLY_BOOL, false);
|
||||
ret = menu_displaylist_parse_settings_enum(menu, info,
|
||||
|
@ -3997,6 +3997,22 @@ static bool setting_append_list(
|
||||
general_read_handler);
|
||||
menu_settings_list_current_add_range(list, list_info, 0, 3, 1, true, true);
|
||||
|
||||
CONFIG_BOOL(
|
||||
list, list_info,
|
||||
&settings->input.menu_swap_ok_cancel_buttons,
|
||||
MENU_ENUM_LABEL_MENU_INPUT_SWAP_OK_CANCEL,
|
||||
MENU_ENUM_LABEL_VALUE_MENU_INPUT_SWAP_OK_CANCEL,
|
||||
menu_swap_ok_cancel_buttons,
|
||||
MENU_ENUM_LABEL_VALUE_OFF,
|
||||
MENU_ENUM_LABEL_VALUE_ON,
|
||||
&group_info,
|
||||
&subgroup_info,
|
||||
parent_group,
|
||||
general_write_handler,
|
||||
general_read_handler,
|
||||
SD_FLAG_NONE
|
||||
);
|
||||
|
||||
CONFIG_BOOL(
|
||||
list, list_info,
|
||||
&settings->input.all_users_control_menu,
|
||||
|
@ -454,6 +454,7 @@ enum msg_hash_enums
|
||||
MENU_ENUM_LABEL_INPUT_MAX_USERS,
|
||||
MENU_ENUM_LABEL_INPUT_REMAP_BINDS_ENABLE,
|
||||
MENU_ENUM_LABEL_INPUT_AXIS_THRESHOLD,
|
||||
MENU_ENUM_LABEL_MENU_INPUT_SWAP_OK_CANCEL,
|
||||
MENU_ENUM_LABEL_INPUT_SMALL_KEYBOARD_ENABLE,
|
||||
MENU_ENUM_LABEL_INPUT_TOUCH_ENABLE,
|
||||
MENU_ENUM_LABEL_INPUT_PREFER_FRONT_TOUCH,
|
||||
@ -563,6 +564,7 @@ enum msg_hash_enums
|
||||
MENU_ENUM_LABEL_VALUE_INPUT_MAX_USERS,
|
||||
MENU_ENUM_LABEL_VALUE_INPUT_REMAP_BINDS_ENABLE,
|
||||
MENU_ENUM_LABEL_VALUE_INPUT_AXIS_THRESHOLD,
|
||||
MENU_ENUM_LABEL_VALUE_MENU_INPUT_SWAP_OK_CANCEL,
|
||||
MENU_ENUM_LABEL_VALUE_INPUT_BIND_TIMEOUT,
|
||||
MENU_ENUM_LABEL_VALUE_INPUT_TURBO_PERIOD,
|
||||
MENU_ENUM_LABEL_VALUE_INPUT_OVERLAY_ENABLE,
|
||||
|
Loading…
Reference in New Issue
Block a user