Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions config.def.h
Original file line number Diff line number Diff line change
Expand Up @@ -1661,6 +1661,7 @@
#define DEFAULT_INPUT_HOTKEY_BLOCK_DELAY 5
#define DEFAULT_INPUT_HOTKEY_DEVICE_MERGE false
#define DEFAULT_INPUT_HOTKEY_FOLLOWS_PLAYER1 false
#define DEFAULT_INPUT_MENU_TOGGLE_IGNORE_ENABLE_HOTKEY false

#define DEFAULT_GFX_THUMBNAILS_DEFAULT 3

Expand Down
1 change: 1 addition & 0 deletions configuration.c
Original file line number Diff line number Diff line change
Expand Up @@ -2187,6 +2187,7 @@ static struct config_bool_setting *populate_settings_bool(
SETTING_BOOL("input_remap_sort_by_controller_enable", &settings->bools.input_remap_sort_by_controller_enable, true, false, false);
SETTING_BOOL("input_hotkey_device_merge", &settings->bools.input_hotkey_device_merge, true, DEFAULT_INPUT_HOTKEY_DEVICE_MERGE, false);
SETTING_BOOL("input_hotkey_follows_player1", &settings->bools.input_hotkey_follows_player1, true, DEFAULT_INPUT_HOTKEY_FOLLOWS_PLAYER1, false);
SETTING_BOOL("input_menu_toggle_ignore_enable_hotkey", &settings->bools.input_menu_toggle_ignore_enable_hotkey, true, DEFAULT_INPUT_MENU_TOGGLE_IGNORE_ENABLE_HOTKEY, false);
#ifdef HAVE_MENU
SETTING_BOOL("all_users_control_menu", &settings->bools.input_all_users_control_menu, true, DEFAULT_ALL_USERS_CONTROL_MENU, false);
SETTING_BOOL("menu_swap_ok_cancel_buttons", &settings->bools.input_menu_swap_ok_cancel_buttons, true, DEFAULT_MENU_SWAP_OK_CANCEL_BUTTONS, false);
Expand Down
1 change: 1 addition & 0 deletions configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -763,6 +763,7 @@ typedef struct settings
bool input_turbo_allow_dpad;
bool input_hotkey_device_merge;
bool input_hotkey_follows_player1;
bool input_menu_toggle_ignore_enable_hotkey;
#if defined(HAVE_DINPUT) || defined(HAVE_WINRAWINPUT)
bool input_nowinkey_enable;
#endif
Expand Down
10 changes: 8 additions & 2 deletions input/input_driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -5923,7 +5923,8 @@ static void input_keys_pressed(
const input_device_driver_t *joypad,
const input_device_driver_t *sec_joypad,
rarch_joypad_info_t *joypad_info,
bool input_hotkey_device_merge)
bool input_hotkey_device_merge,
bool input_menu_toggle_ignore_enable_hotkey)
{
unsigned i;
/* Autoconf binds are indexed by joy_idx, not frontend port */
Expand Down Expand Up @@ -6223,6 +6224,10 @@ static void input_keys_pressed(
block_hotkey[RARCH_GAME_FOCUS_TOGGLE] = false;
}

/* Never block Menu Toggle if setting is enabled */
if (input_menu_toggle_ignore_enable_hotkey)
block_hotkey[RARCH_MENU_TOGGLE] = false;

for (i = RARCH_FIRST_META_KEY; i < RARCH_BIND_LIST_END; i++)
{
bool other_pressed = input_keys_pressed_other_sources(input_st, i, p_new_state);
Expand Down Expand Up @@ -7243,7 +7248,8 @@ void input_driver_collect_system_input(input_driver_state_t *input_st,
joypad,
sec_joypad,
&joypad_info,
settings->bools.input_hotkey_device_merge);
settings->bools.input_hotkey_device_merge,
settings->bools.input_menu_toggle_ignore_enable_hotkey);

#ifdef HAVE_MENU
if (menu_is_alive)
Expand Down
4 changes: 4 additions & 0 deletions intl/msg_hash_lbl.h
Original file line number Diff line number Diff line change
Expand Up @@ -1886,6 +1886,10 @@ MSG_HASH(
MENU_ENUM_LABEL_INPUT_HOTKEY_DEVICE_MERGE,
"input_hotkey_device_merge"
)
MSG_HASH(
MENU_ENUM_LABEL_INPUT_MENU_TOGGLE_IGNORE_ENABLE_HOTKEY,
"input_menu_toggle_ignore_enable_hotkey"
)
MSG_HASH(
MENU_ENUM_LABEL_INPUT_ICADE_ENABLE,
"input_icade_enable"
Expand Down
8 changes: 8 additions & 0 deletions intl/msg_hash_us.h
Original file line number Diff line number Diff line change
Expand Up @@ -3651,6 +3651,14 @@ MSG_HASH(
MENU_ENUM_SUBLABEL_INPUT_HOTKEY_FOLLOWS_PLAYER1,
"Hotkeys are bound to core port 1, even if core port 1 is remapped to a different user. Note: keyboard hotkeys will not work if core port 1 is remapped to any user > 1 (keyboard input is from user 1)."
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_INPUT_MENU_TOGGLE_IGNORE_ENABLE_HOTKEY,
"Menu Toggle Without Hotkey Enable"
)
MSG_HASH(
MENU_ENUM_SUBLABEL_INPUT_MENU_TOGGLE_IGNORE_ENABLE_HOTKEY,
"Allow Menu Toggle hotkey to work without requiring 'Hotkey Enable' to be held. All other hotkeys still respect 'Hotkey Enable'."
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_INPUT_MENU_ENUM_TOGGLE_GAMEPAD_COMBO,
"Menu Toggle (Controller Combo)"
Expand Down
4 changes: 4 additions & 0 deletions menu/cbs/menu_cbs_sublabel.c
Original file line number Diff line number Diff line change
Expand Up @@ -497,6 +497,7 @@ DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_input_meta_netplay_fade_chat_toggle,
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_input_hotkey_block_delay, MENU_ENUM_SUBLABEL_INPUT_HOTKEY_BLOCK_DELAY)
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_input_hotkey_device_merge, MENU_ENUM_SUBLABEL_INPUT_HOTKEY_DEVICE_MERGE)
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_input_hotkey_follows_player1, MENU_ENUM_SUBLABEL_INPUT_HOTKEY_FOLLOWS_PLAYER1)
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_input_menu_toggle_ignore_enable_hotkey, MENU_ENUM_SUBLABEL_INPUT_MENU_TOGGLE_IGNORE_ENABLE_HOTKEY)
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_input_device_type, MENU_ENUM_SUBLABEL_INPUT_DEVICE_TYPE)
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_input_device_index, MENU_ENUM_SUBLABEL_INPUT_DEVICE_INDEX)
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_input_mouse_index, MENU_ENUM_SUBLABEL_INPUT_MOUSE_INDEX)
Expand Down Expand Up @@ -5049,6 +5050,9 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs,
case MENU_ENUM_LABEL_INPUT_HOTKEY_FOLLOWS_PLAYER1:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_input_hotkey_follows_player1);
break;
case MENU_ENUM_LABEL_INPUT_MENU_TOGGLE_IGNORE_ENABLE_HOTKEY:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_input_menu_toggle_ignore_enable_hotkey);
break;
case MENU_ENUM_LABEL_INPUT_USER_1_BINDS:
case MENU_ENUM_LABEL_INPUT_USER_2_BINDS:
case MENU_ENUM_LABEL_INPUT_USER_3_BINDS:
Expand Down
4 changes: 4 additions & 0 deletions menu/menu_displaylist.c
Original file line number Diff line number Diff line change
Expand Up @@ -7604,6 +7604,10 @@ unsigned menu_displaylist_build_list(
MENU_ENUM_LABEL_INPUT_HOTKEY_FOLLOWS_PLAYER1,
PARSE_ONLY_BOOL, false) == 0)
count++;
if (MENU_DISPLAYLIST_PARSE_SETTINGS_ENUM(list,
MENU_ENUM_LABEL_INPUT_MENU_TOGGLE_IGNORE_ENABLE_HOTKEY,
PARSE_ONLY_BOOL, false) == 0)
count++;

/* All other binds come last */
for (i = 0; i < RARCH_BIND_LIST_END; i++)
Expand Down
16 changes: 16 additions & 0 deletions menu/menu_setting.c
Original file line number Diff line number Diff line change
Expand Up @@ -15998,6 +15998,22 @@ static bool setting_append_list(
SD_FLAG_NONE
);

CONFIG_BOOL(
list, list_info,
&settings->bools.input_menu_toggle_ignore_enable_hotkey,
MENU_ENUM_LABEL_INPUT_MENU_TOGGLE_IGNORE_ENABLE_HOTKEY,
MENU_ENUM_LABEL_VALUE_INPUT_MENU_TOGGLE_IGNORE_ENABLE_HOTKEY,
DEFAULT_INPUT_MENU_TOGGLE_IGNORE_ENABLE_HOTKEY,
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->bools.input_menu_swap_ok_cancel_buttons,
Expand Down
1 change: 1 addition & 0 deletions msg_hash.h
Original file line number Diff line number Diff line change
Expand Up @@ -921,6 +921,7 @@ enum msg_hash_enums
MENU_LABEL(INPUT_HOTKEY_BLOCK_DELAY),
MENU_LABEL(INPUT_HOTKEY_DEVICE_MERGE),
MENU_LABEL(INPUT_HOTKEY_FOLLOWS_PLAYER1),
MENU_LABEL(INPUT_MENU_TOGGLE_IGNORE_ENABLE_HOTKEY),
MENU_LABEL(INPUT_SPLIT_JOYCON),

MENU_ENUM_LABEL_INPUT_HOTKEY_BINDS_BEGIN,
Expand Down
Loading