From 1ceb3c78135c03f76209a0032baed3ed669d6b9e Mon Sep 17 00:00:00 2001 From: Michael Smith Date: Tue, 26 Apr 2022 04:17:40 +0100 Subject: Fix GetCursorPos hook return value I'd noticed this at some point but it didn't seem to matter, and now all of sudden it does matter because magic. The hook just stopped working suddenly. --- src/rinput.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rinput.c b/src/rinput.c index 8d94b36..6286eda 100644 --- a/src/rinput.c +++ b/src/rinput.c @@ -68,7 +68,7 @@ static GetCursorPos_func orig_GetCursorPos; static int __stdcall hook_GetCursorPos(POINT *p) { if (!con_getvari(m_rawinput)) return orig_GetCursorPos(p); p->x = dx; p->y = dy; - return 0; + return 1; } typedef int (*__stdcall SetCursorPos_func)(int x, int y); static SetCursorPos_func orig_SetCursorPos; -- cgit v1.2.3