Extend mouse acceleratoin table to handle larger moves

This commit is contained in:
dschmenk 2013-06-02 22:43:23 -07:00
parent 5b6cfc7763
commit 32be3492c3

View File

@ -308,8 +308,8 @@ int scancode[256] = {
MOD_SHIFT | KEY_GRAVE, // ~ code 7E MOD_SHIFT | KEY_GRAVE, // ~ code 7E
KEY_DELETE // DELETE code 7F KEY_DELETE // DELETE code 7F
}; };
int accel[16] = { 0, 1, 4, 8, 8, 8, 8, 8, int accel[32] = { 0, 1, 4, 8, 8, 8, 8, 8, 8, 9, 10, 11, 12, 13, 14, 15
-8, -8, -8, -8, -8, -8, -4, -1}; -16, -15, -14, -13, -12, -11, -10, -9, -8, -8, -8, -8, -8, -8, -4, -1};
volatile int stop = FALSE, isdaemon = FALSE; volatile int stop = FALSE, isdaemon = FALSE;
struct input_event evkey, evrelx, evrely, evsync; struct input_event evkey, evrelx, evrely, evsync;
@ -702,7 +702,7 @@ void main(int argc, char **argv)
break; break;
case 0x84: /* mouse move event */ case 0x84: /* mouse move event */
// printf("Mouse XY Event: %d,%d\n", (signed char)iopkt[1], (signed char)iopkt[2]); // printf("Mouse XY Event: %d,%d\n", (signed char)iopkt[1], (signed char)iopkt[2]);
sendrelxy(moufd, accel[iopkt[1] & 0x0F], accel[iopkt[2] & 0x0F]); sendrelxy(moufd, accel[iopkt[1] & 0x1F], accel[iopkt[2] & 0x1F]);
break; break;
case 0x86: /* mouse button event */ case 0x86: /* mouse button event */
// printf("Mouse Button %s Event 0x%02X\n", iopkt[2] ? "[PRESS]" : "[RELEASE]", iopkt[1]); // printf("Mouse Button %s Event 0x%02X\n", iopkt[2] ? "[PRESS]" : "[RELEASE]", iopkt[1]);