From a8ab559de012541b5565b4a9a2d64f725a91c96b Mon Sep 17 00:00:00 2001 From: Geoffrey McRae Date: Tue, 23 Feb 2021 20:04:15 +1100 Subject: [PATCH] [client] core: increase autoCapture false exit detection sensitivity Mouse move deltas greater then 10 are rare, let alone the 20 this code now uses. Any movements that exceed 20 pixels will disable the exit detection code path preventing rapid movements in FPV games from causing the cursor to exit the window if autoCapture is enabled. --- client/src/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/core.c b/client/src/core.c index 2bd7fa53..2469f04e 100644 --- a/client/src/core.c +++ b/client/src/core.c @@ -393,7 +393,7 @@ void core_handleMouseNormal(double ex, double ey) /* if we are in "autoCapture" and the delta was large don't test for exit */ if (g_params.autoCapture && - (fabs(ex) > 100.0 / g_cursor.scale.x || fabs(ey) > 100.0 / g_cursor.scale.y)) + (fabs(ex) > 20.0 / g_cursor.scale.x || fabs(ey) > 20.0 / g_cursor.scale.y)) testExit = false; /* if any buttons are held we should not allow exit to happen */