diff options
| -rw-r--r-- | src/engine/client/ec_client.c | 8 | ||||
| -rw-r--r-- | src/game/variables.hpp | 1 |
2 files changed, 8 insertions, 1 deletions
diff --git a/src/engine/client/ec_client.c b/src/engine/client/ec_client.c index cdcbf12a..ef0a25af 100644 --- a/src/engine/client/ec_client.c +++ b/src/engine/client/ec_client.c @@ -1542,14 +1542,20 @@ static void client_run() perf_end(); } - /* refocus */ + /* release focus */ if(!gfx_window_active()) { if(window_must_refocus == 0) inp_mouse_mode_absolute(); window_must_refocus = 1; } + else if (config.dbg_focus && inp_key_pressed(KEY_ESC)) + { + inp_mouse_mode_absolute(); + window_must_refocus = 1; + } + /* refocus */ if(window_must_refocus && gfx_window_active()) { if(window_must_refocus < 3) diff --git a/src/game/variables.hpp b/src/game/variables.hpp index 1928d1b7..cd738bf3 100644 --- a/src/game/variables.hpp +++ b/src/game/variables.hpp @@ -37,6 +37,7 @@ MACRO_CONFIG_INT(dbg_dummies, 0, 0, 11) MACRO_CONFIG_INT(dbg_firedelay, 0, 0, 1) MACRO_CONFIG_INT(dbg_flow, 0, 0, 1) MACRO_CONFIG_INT(dbg_tuning, 0, 0, 1) +MACRO_CONFIG_INT(dbg_focus, 0, 0, 1) MACRO_CONFIG_INT(ui_page, 5, 0, 9) MACRO_CONFIG_STR(ui_server_address, 128, "localhost:8303") |