From 60cdda4c536f7f82dadb1ac2763fc17fe66b91bc Mon Sep 17 00:00:00 2001 From: ekeeke31 Date: Tue, 21 Apr 2009 15:23:32 +0000 Subject: [PATCH] + added X/Y overflow for Mouse emulation --- source/gen_input.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source/gen_input.c b/source/gen_input.c index 3098cd5..f64f42f 100644 --- a/source/gen_input.c +++ b/source/gen_input.c @@ -205,8 +205,10 @@ uint32 mouse_read() break; case 4: /* Axis sign and overflow */ - if (input.analog[2][0] < 0) temp |= 0x01; - if (input.analog[2][1] < 0) temp |= 0x02; + if (input.analog[2][0] < 0) temp |= 0x01; + if (input.analog[2][1] < 0) temp |= 0x02; + if (abs(input.analog[2][0]) > 255) temp |= 0x04; + if (abs(input.analog[2][1]) > 255) temp |= 0x08; break; case 5: /* Buttons state */