1
0
mirror of https://github.com/libretro/RetroArch synced 2025-03-09 13:13:31 +00:00

Game focus updates:

- Prevent mouse cursor visibility in fullscreen when ungrabbed via game focus
- Reformat logging
This commit is contained in:
Tony Jansson 2020-08-06 14:15:55 +03:00
parent b05686efb1
commit 53340385a6

@ -16971,6 +16971,7 @@ bool command_event(enum event_command cmd, void *data)
case CMD_EVENT_GAME_FOCUS_TOGGLE: case CMD_EVENT_GAME_FOCUS_TOGGLE:
{ {
static bool game_focus_state = false; static bool game_focus_state = false;
bool video_fullscreen = settings->bools.video_fullscreen || p_rarch->rarch_force_fullscreen;
intptr_t mode = (intptr_t)data; intptr_t mode = (intptr_t)data;
/* mode = -1: restores current game focus state /* mode = -1: restores current game focus state
@ -16982,8 +16983,8 @@ bool command_event(enum event_command cmd, void *data)
else if (mode != -1) else if (mode != -1)
game_focus_state = !game_focus_state; game_focus_state = !game_focus_state;
RARCH_LOG("%s: %s.\n", RARCH_LOG("%s => %s\n",
"Game focus is: ", "Game focus",
game_focus_state ? "on" : "off"); game_focus_state ? "on" : "off");
if (game_focus_state) if (game_focus_state)
@ -17000,7 +17001,8 @@ bool command_event(enum event_command cmd, void *data)
else else
{ {
input_driver_ungrab_mouse(p_rarch); input_driver_ungrab_mouse(p_rarch);
video_driver_show_mouse(); if (!video_fullscreen)
video_driver_show_mouse();
p_rarch->input_driver_block_hotkey = false; p_rarch->input_driver_block_hotkey = false;
p_rarch->current_input->keyboard_mapping_blocked = false; p_rarch->current_input->keyboard_mapping_blocked = false;
if (mode != -1) if (mode != -1)