Skip to content

Commit

Permalink
Enable input_auto_mouse_grab by default for Android
Browse files Browse the repository at this point in the history
  • Loading branch information
PatrickStankard committed Feb 6, 2024
1 parent a045fdc commit 0159e46
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
8 changes: 8 additions & 0 deletions config.def.h
Original file line number Diff line number Diff line change
Expand Up @@ -1524,6 +1524,14 @@
#define DEFAULT_TURBO_DEFAULT_BTN RETRO_DEVICE_ID_JOYPAD_B
#define DEFAULT_ALLOW_TURBO_DPAD false

/* Enable automatic mouse grab by default
* only on Android */
#if defined(ANDROID)
#define DEFAULT_INPUT_AUTO_MOUSE_GRAB true
#else
#define DEFAULT_INPUT_AUTO_MOUSE_GRAB false
#endif

#if TARGET_OS_IPHONE
#define DEFAULT_INPUT_KEYBOARD_GAMEPAD_ENABLE false
#else
Expand Down
2 changes: 1 addition & 1 deletion configuration.c
Original file line number Diff line number Diff line change
Expand Up @@ -2076,7 +2076,7 @@ static struct config_bool_setting *populate_settings_bool(
SETTING_BOOL("keyboard_gamepad_enable", &settings->bools.input_keyboard_gamepad_enable, true, DEFAULT_INPUT_KEYBOARD_GAMEPAD_ENABLE, false);
SETTING_BOOL("input_autodetect_enable", &settings->bools.input_autodetect_enable, true, DEFAULT_INPUT_AUTODETECT_ENABLE, false);
SETTING_BOOL("input_allow_turbo_dpad", &settings->bools.input_allow_turbo_dpad, true, DEFAULT_ALLOW_TURBO_DPAD, false);
SETTING_BOOL("input_auto_mouse_grab", &settings->bools.input_auto_mouse_grab, true, false, false);
SETTING_BOOL("input_auto_mouse_grab", &settings->bools.input_auto_mouse_grab, true, DEFAULT_INPUT_AUTO_MOUSE_GRAB, false);
SETTING_BOOL("input_remap_binds_enable", &settings->bools.input_remap_binds_enable, true, true, false);
SETTING_BOOL("input_hotkey_device_merge", &settings->bools.input_hotkey_device_merge, true, DEFAULT_INPUT_HOTKEY_DEVICE_MERGE, false);
SETTING_BOOL("all_users_control_menu", &settings->bools.input_all_users_control_menu, true, DEFAULT_ALL_USERS_CONTROL_MENU, false);
Expand Down
2 changes: 1 addition & 1 deletion menu/menu_setting.c
Original file line number Diff line number Diff line change
Expand Up @@ -15078,7 +15078,7 @@ static bool setting_append_list(
&settings->bools.input_auto_mouse_grab,
MENU_ENUM_LABEL_INPUT_AUTO_MOUSE_GRAB,
MENU_ENUM_LABEL_VALUE_INPUT_AUTO_MOUSE_GRAB,
false,
DEFAULT_INPUT_AUTO_MOUSE_GRAB,
MENU_ENUM_LABEL_VALUE_OFF,
MENU_ENUM_LABEL_VALUE_ON,
&group_info,
Expand Down

0 comments on commit 0159e46

Please sign in to comment.