mirror of
https://github.com/libretro/RetroArch
synced 2025-03-29 04:20:28 +00:00
Don't print game focus OSD message if input is -1
This commit is contained in:
parent
b4c1927e27
commit
a47dd21751
21
command.c
21
command.c
@ -294,7 +294,7 @@ static const struct cmd_map map[] = {
|
||||
{ "DISK_NEXT", RARCH_DISK_NEXT },
|
||||
{ "DISK_PREV", RARCH_DISK_PREV },
|
||||
{ "GRAB_MOUSE_TOGGLE", RARCH_GRAB_MOUSE_TOGGLE },
|
||||
{ "GAME_FOCUS_TOGGLE", RARCH_GAME_FOCUS_TOGGLE },
|
||||
{ "GAME_FOCUS_TOGGLE", RARCH_GAME_FOCUS_TOGGLE },
|
||||
{ "MENU_TOGGLE", RARCH_MENU_TOGGLE },
|
||||
{ "MENU_UP", RETRO_DEVICE_ID_JOYPAD_UP },
|
||||
{ "MENU_DOWN", RETRO_DEVICE_ID_JOYPAD_DOWN },
|
||||
@ -2500,7 +2500,7 @@ bool command_event(enum event_command cmd, void *data)
|
||||
case CMD_EVENT_GAME_FOCUS_TOGGLE:
|
||||
{
|
||||
static bool game_focus_state = false;
|
||||
long int mode = (long int)data;
|
||||
long int mode = (long int)data;
|
||||
|
||||
/* mode = -1: restores current game focus state
|
||||
* mode = 1: force set game focus, instead of toggling
|
||||
@ -2515,20 +2515,25 @@ bool command_event(enum event_command cmd, void *data)
|
||||
"Game focus is: ",
|
||||
game_focus_state ? "on" : "off");
|
||||
|
||||
if (game_focus_state) {
|
||||
if (game_focus_state)
|
||||
{
|
||||
input_driver_grab_mouse();
|
||||
video_driver_hide_mouse();
|
||||
input_driver_set_hotkey_block();
|
||||
input_driver_keyboard_mapping_set_block(1);
|
||||
runloop_msg_queue_push(msg_hash_to_str(MSG_GAME_FOCUS_ON),
|
||||
1, 120, true);
|
||||
} else {
|
||||
if (mode != -1)
|
||||
runloop_msg_queue_push(msg_hash_to_str(MSG_GAME_FOCUS_ON),
|
||||
1, 120, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
input_driver_ungrab_mouse();
|
||||
video_driver_show_mouse();
|
||||
input_driver_unset_hotkey_block();
|
||||
input_driver_keyboard_mapping_set_block(0);
|
||||
runloop_msg_queue_push(msg_hash_to_str(MSG_GAME_FOCUS_OFF),
|
||||
1, 120, true);
|
||||
if (mode != -1)
|
||||
runloop_msg_queue_push(msg_hash_to_str(MSG_GAME_FOCUS_OFF),
|
||||
1, 120, true);
|
||||
}
|
||||
|
||||
}
|
||||
|
2
deps/SPIRV-Cross
vendored
2
deps/SPIRV-Cross
vendored
@ -1 +1 @@
|
||||
Subproject commit 5c24d99ff22a25ef38e9e39985f80cf57a1e7418
|
||||
Subproject commit cc207e32c8668bfe5a5cc514394e7df8f020ecf6
|
2
deps/glslang/glslang
vendored
2
deps/glslang/glslang
vendored
@ -1 +1 @@
|
||||
Subproject commit a4a4d5e22c375d37bd286106904ef819eafff29b
|
||||
Subproject commit 2eb0986f10392a4c2365869b17b59ad79226c440
|
Loading…
x
Reference in New Issue
Block a user