Get rid of the awkward mouse acceleration

This commit is contained in:
Kevin Lange 2012-10-12 00:17:23 -07:00
parent 0387b2d2c3
commit 8b69e7ef68
2 changed files with 2 additions and 12 deletions

View File

@ -935,18 +935,9 @@ void * process_requests(void * garbage) {
}
//redraw_region_slow(mouse_x / MOUSE_SCALE - 32, mouse_y / MOUSE_SCALE - 32, 64, 64);
/* Apply mouse movement */
int c, l;
c = abs(packet->x_difference);
l = 0;
while (c >>= 1) {
l++;
}
int l;
l = 3;
mouse_x += packet->x_difference * l;
c = abs(packet->y_difference);
l = 0;
while (c >>= 1) {
l++;
}
mouse_y -= packet->y_difference * l;
if (mouse_x < 0) mouse_x = 0;
if (mouse_y < 0) mouse_y = 0;

View File

@ -12,5 +12,4 @@ int main(int argc, char ** argv) {
fflush(stdout);
}
return 0;
return 0;
}