mirror of
https://github.com/dschmenk/apple2pi.git
synced 2024-11-24 12:31:30 +00:00
Simplify mouse acceleration
This commit is contained in:
parent
75386bb3a2
commit
629bceb6b6
@ -445,8 +445,8 @@ void sendrelxy(int fd, int x, int y)
|
|||||||
x = ((x > 4) || (x < -4)) ? x * 2 : accel[x & 0x1F];
|
x = ((x > 4) || (x < -4)) ? x * 2 : accel[x & 0x1F];
|
||||||
y = ((y > 4) || (y < -4)) ? y * 2 : accel[y & 0x1F];
|
y = ((y > 4) || (y < -4)) ? y * 2 : accel[y & 0x1F];
|
||||||
#else
|
#else
|
||||||
x = ((x > 3) || (x < -3)) ? x * 9 : (x < 0 ? -x * x : x * x);
|
x = ((x > 1) || (x < -1)) ? x * 2 : x;
|
||||||
y = ((y > 3) || (y < -3)) ? y * 9 : (y < 0 ? -y * y : y * y);
|
y = ((y > 1) || (y < -1)) ? y * 2 : y;
|
||||||
#endif
|
#endif
|
||||||
evrelx.value = x;
|
evrelx.value = x;
|
||||||
evrely.value = y;
|
evrely.value = y;
|
||||||
|
Loading…
Reference in New Issue
Block a user