|
|
| version 1.4, 2003/10/23 06:26:16 | version 1.5, 2003/10/24 12:35:19 |
|---|---|
| Line 75 void mouse_running(BYTE flg) { | Line 75 void mouse_running(BYTE flg) { |
| } | } |
| void mouse_callback(void) { | void mouse_callback(HIPoint delta) { |
| Point cp; | Point cp; |
| CGMouseDelta x,y; | |
| static CGMouseDelta pastx=0,pasty=0; | |
| if (lastmouse & 1) { | if (lastmouse & 1) { |
| CGGetLastMouseDelta(&x, &y); | mousex += (short)delta.x; |
| if ((pastx!=x) && (pasty!=y)) { | mousey += (short)delta.y; |
| mousex += (short)x; | getmaincenter(&cp); |
| mousey += (short)y; | CGWarpMouseCursorPosition(CGPointMake(cp.h, cp.v)); |
| pastx = x; | |
| pasty = y; | |
| getmaincenter(&cp); | |
| CGWarpMouseCursorPosition(CGPointMake(cp.h, cp.v)); | |
| } | |
| } | } |
| } | } |