summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMichael Smith <mikesmiffy128@gmail.com>2022-04-26 04:17:40 +0100
committerMichael Smith <mikesmiffy128@gmail.com>2022-04-26 04:17:40 +0100
commit1ceb3c78135c03f76209a0032baed3ed669d6b9e (patch)
tree81c96d31b19df72ac03623a8195702dc64d92438
parent2c4ba829aa2095cfe3531bec18e50c3c6310d264 (diff)
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.
-rw-r--r--src/rinput.c2
1 files changed, 1 insertions, 1 deletions
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;