mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-03-04 09:27:15 +00:00
Add toggle to show/hide mouse cursor with overlays
This commit is contained in:
parent
7ea2034922
commit
ed1d98d2a2
@ -263,6 +263,7 @@ static const unsigned int def_user_language = 0;
|
||||
#define DEFAULT_SHOW_HIDDEN_FILES false
|
||||
|
||||
#define DEFAULT_OVERLAY_HIDE_IN_MENU true
|
||||
#define DEFAULT_OVERLAY_SHOW_MOUSE_CURSOR true
|
||||
|
||||
#define DEFAULT_DISPLAY_KEYBOARD_OVERLAY false
|
||||
|
||||
|
@ -1569,6 +1569,7 @@ static struct config_bool_setting *populate_settings_bool(settings_t *settings,
|
||||
SETTING_BOOL("input_overlay_enable_autopreferred", &settings->bools.input_overlay_enable_autopreferred, true, true, false);
|
||||
SETTING_BOOL("input_overlay_show_physical_inputs", &settings->bools.input_overlay_show_physical_inputs, true, false, false);
|
||||
SETTING_BOOL("input_overlay_hide_in_menu", &settings->bools.input_overlay_hide_in_menu, true, DEFAULT_OVERLAY_HIDE_IN_MENU, false);
|
||||
SETTING_BOOL("input_overlay_show_mouse_cursor", &settings->bools.input_overlay_show_mouse_cursor, true, DEFAULT_OVERLAY_SHOW_MOUSE_CURSOR, false);
|
||||
#endif
|
||||
#ifdef HAVE_VIDEO_LAYOUT
|
||||
SETTING_BOOL("video_layout_enable", &settings->bools.video_layout_enable, true, true, false);
|
||||
|
@ -129,6 +129,7 @@ typedef struct settings
|
||||
bool input_overlay_enable_autopreferred;
|
||||
bool input_overlay_hide_in_menu;
|
||||
bool input_overlay_show_physical_inputs;
|
||||
bool input_overlay_show_mouse_cursor;
|
||||
bool input_descriptor_label_show;
|
||||
bool input_descriptor_hide_unbound;
|
||||
bool input_all_users_control_menu;
|
||||
|
@ -602,6 +602,7 @@ void input_overlay_loaded(retro_task_t *task,
|
||||
overlay_task_data_t *data = (overlay_task_data_t*)task_data;
|
||||
input_overlay_t *ol = NULL;
|
||||
const video_overlay_interface_t *iface = NULL;
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
if (err)
|
||||
return;
|
||||
@ -642,6 +643,10 @@ void input_overlay_loaded(retro_task_t *task,
|
||||
overlay_ptr = ol;
|
||||
|
||||
free(data);
|
||||
|
||||
if (!settings->bools.input_overlay_show_mouse_cursor)
|
||||
video_driver_hide_mouse();
|
||||
|
||||
return;
|
||||
|
||||
abort_load:
|
||||
|
@ -571,6 +571,8 @@ MSG_HASH(MENU_ENUM_LABEL_INPUT_OVERLAY_SHOW_PHYSICAL_INPUTS,
|
||||
"overlay_show_physical_inputs")
|
||||
MSG_HASH(MENU_ENUM_LABEL_INPUT_OVERLAY_SHOW_PHYSICAL_INPUTS_PORT,
|
||||
"overlay_show_physical_inputs_port")
|
||||
MSG_HASH(MENU_ENUM_LABEL_INPUT_OVERLAY_SHOW_MOUSE_CURSOR,
|
||||
"overlay_show_mouse_cursor")
|
||||
MSG_HASH(MENU_ENUM_LABEL_INPUT_PLAYER_ANALOG_DPAD_MODE,
|
||||
"input_player%u_analog_dpad_mode")
|
||||
MSG_HASH(MENU_ENUM_LABEL_INPUT_POLL_TYPE_BEHAVIOR,
|
||||
|
@ -1420,6 +1420,10 @@ MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_INPUT_OVERLAY_SHOW_PHYSICAL_INPUTS,
|
||||
"Show Inputs On Overlay"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_INPUT_OVERLAY_SHOW_MOUSE_CURSOR,
|
||||
"Show Mouse Cursor With Overlay"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_INPUT_OVERLAY_SHOW_PHYSICAL_INPUTS_PORT,
|
||||
"Show Inputs Listen Port"
|
||||
@ -5516,6 +5520,10 @@ MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_INPUT_OVERLAY_SHOW_PHYSICAL_INPUTS_PORT,
|
||||
"Select the port for the overlay to listen to if Show Inputs On Overlay is enabled."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_INPUT_OVERLAY_SHOW_MOUSE_CURSOR,
|
||||
"Show the mouse cursor when using an onscreen overlay."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_PLAYLISTS_TAB,
|
||||
"Scanned content matching the database will appear here."
|
||||
|
@ -250,6 +250,7 @@ default_sublabel_macro(action_bind_sublabel_video_message_pos_x, MENU_
|
||||
default_sublabel_macro(action_bind_sublabel_video_message_pos_y, MENU_ENUM_SUBLABEL_VIDEO_MESSAGE_POS_Y)
|
||||
default_sublabel_macro(action_bind_sublabel_video_font_size, MENU_ENUM_SUBLABEL_VIDEO_FONT_SIZE)
|
||||
default_sublabel_macro(action_bind_sublabel_input_overlay_hide_in_menu, MENU_ENUM_SUBLABEL_INPUT_OVERLAY_HIDE_IN_MENU)
|
||||
default_sublabel_macro(action_bind_sublabel_input_overlay_show_mouse_cursor, MENU_ENUM_SUBLABEL_INPUT_OVERLAY_SHOW_MOUSE_CURSOR)
|
||||
default_sublabel_macro(action_bind_sublabel_content_collection_list, MENU_ENUM_SUBLABEL_PLAYLISTS_TAB)
|
||||
default_sublabel_macro(action_bind_sublabel_video_scale_integer, MENU_ENUM_SUBLABEL_VIDEO_SCALE_INTEGER)
|
||||
default_sublabel_macro(action_bind_sublabel_video_gpu_screenshot, MENU_ENUM_SUBLABEL_VIDEO_GPU_SCREENSHOT)
|
||||
@ -2018,6 +2019,9 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs,
|
||||
case MENU_ENUM_LABEL_INPUT_OVERLAY_SHOW_PHYSICAL_INPUTS_PORT:
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_input_overlay_show_physical_inputs_port);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_INPUT_OVERLAY_SHOW_MOUSE_CURSOR:
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_input_overlay_show_mouse_cursor);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_VIDEO_FONT_SIZE:
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_video_font_size);
|
||||
break;
|
||||
|
@ -3889,6 +3889,7 @@ unsigned menu_displaylist_build_list(file_list_t *list, enum menu_displaylist_ct
|
||||
{MENU_ENUM_LABEL_INPUT_OVERLAY_HIDE_IN_MENU, PARSE_ONLY_BOOL },
|
||||
{MENU_ENUM_LABEL_INPUT_OVERLAY_SHOW_PHYSICAL_INPUTS, PARSE_ONLY_BOOL },
|
||||
{MENU_ENUM_LABEL_INPUT_OVERLAY_SHOW_PHYSICAL_INPUTS_PORT,PARSE_ONLY_BOOL },
|
||||
{MENU_ENUM_LABEL_INPUT_OVERLAY_SHOW_MOUSE_CURSOR, PARSE_ONLY_BOOL },
|
||||
{MENU_ENUM_LABEL_OVERLAY_PRESET, PARSE_ONLY_PATH },
|
||||
{MENU_ENUM_LABEL_OVERLAY_OPACITY, PARSE_ONLY_FLOAT },
|
||||
{MENU_ENUM_LABEL_OVERLAY_SCALE, PARSE_ONLY_FLOAT },
|
||||
|
@ -10703,6 +10703,22 @@ static bool setting_append_list(
|
||||
(*list)[list_info->index - 1].action_ok = &setting_action_ok_uint;
|
||||
menu_settings_list_current_add_range(list, list_info, 0, MAX_USERS - 1, 1, true, true);
|
||||
|
||||
CONFIG_BOOL(
|
||||
list, list_info,
|
||||
&settings->bools.input_overlay_show_mouse_cursor,
|
||||
MENU_ENUM_LABEL_INPUT_OVERLAY_SHOW_MOUSE_CURSOR,
|
||||
MENU_ENUM_LABEL_VALUE_INPUT_OVERLAY_SHOW_MOUSE_CURSOR,
|
||||
DEFAULT_OVERLAY_SHOW_MOUSE_CURSOR,
|
||||
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_PATH(
|
||||
list, list_info,
|
||||
settings->paths.path_overlay,
|
||||
|
@ -777,6 +777,7 @@ enum msg_hash_enums
|
||||
MENU_LABEL(INPUT_OVERLAY_HIDE_IN_MENU),
|
||||
MENU_LABEL(INPUT_OVERLAY_SHOW_PHYSICAL_INPUTS),
|
||||
MENU_LABEL(INPUT_OVERLAY_SHOW_PHYSICAL_INPUTS_PORT),
|
||||
MENU_LABEL(INPUT_OVERLAY_SHOW_MOUSE_CURSOR),
|
||||
MENU_LABEL(INPUT_KEYBOARD_GAMEPAD_MAPPING_TYPE),
|
||||
MENU_LABEL(INPUT_SMALL_KEYBOARD_ENABLE),
|
||||
MENU_LABEL(INPUT_TOUCH_ENABLE),
|
||||
|
Loading…
x
Reference in New Issue
Block a user