Lines 47-58
Link Here
|
47 |
#include <math.h> |
47 |
#include <math.h> |
48 |
#include <string.h> |
48 |
#include <string.h> |
49 |
|
49 |
|
50 |
#define DEF_XY_EXP 1.6 |
50 |
#define DEF_XY_EXP 1.0 |
51 |
#define DEF_Z_EXP 1.2 |
51 |
#define DEF_Z_EXP 1.2 |
52 |
#define DEF_Z_MULT 0.02 |
52 |
#define DEF_Z_MULT 0.02 |
53 |
|
53 |
|
54 |
#define DEF_INDEV "/dev/mouse" |
54 |
#define DEF_INDEV "/dev/input/mouse0" |
55 |
#define DEF_OUTDEV "/dev/imouse" |
55 |
#define DEF_OUTDEV "/dev/tpmouse" |
56 |
|
56 |
|
57 |
void usage(); |
57 |
void usage(); |
58 |
|
58 |
|
Lines 230-238
Link Here
|
230 |
{ |
230 |
{ |
231 |
scroll = 1; |
231 |
scroll = 1; |
232 |
|
232 |
|
233 |
f = (double)z_accel_mult * pow( (double)(abs(y)), (double)z_accel_exp); |
233 |
f = (double)z_accel_mult * pow( (double)(abs(x)), (double)z_accel_exp); |
234 |
#ifdef DEBUG |
234 |
#ifdef DEBUG |
235 |
printf("x scroll %i %f accum %f\n",y,f,x_scroll_accum); |
235 |
printf("x scroll %i %f accum %f\n",x,f,x_scroll_accum); |
236 |
#endif |
236 |
#endif |
237 |
|
237 |
|
238 |
for( x_scroll_accum += f; x_scroll_accum > 1.0; x_scroll_accum -= 1.0 ) |
238 |
for( x_scroll_accum += f; x_scroll_accum > 1.0; x_scroll_accum -= 1.0 ) |
Lines 240-246
Link Here
|
240 |
putc(b & 0x0B, out); |
240 |
putc(b & 0x0B, out); |
241 |
putc(0, out); |
241 |
putc(0, out); |
242 |
putc(0, out); |
242 |
putc(0, out); |
243 |
y < 0 ? putc(0x10, out) : putc(0x20, out); |
243 |
x < 0 ? putc(0x0E, out) : putc(0x02, out); |
244 |
} |
244 |
} |
245 |
|
245 |
|
246 |
fflush(out); |
246 |
fflush(out); |