|
|
| version 1.3, 2003/10/20 10:14:27 | version 1.5, 2003/10/24 12:35:19 |
|---|---|
| Line 1 | Line 1 |
| #if defined(NP2GCC) | #if defined(NP2GCC) |
| #include "compiler.h" | #include "compiler.h" |
| #include "np2.h" | #include "np2.h" |
| #include "mousemng.h" | #include "mousemng.h" |
| Line 73 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)); | |
| } | |
| } | } |
| } | } |
| Line 129 BYTE mouse_btn(BYTE btn) { | Line 124 BYTE mouse_btn(BYTE btn) { |
| } | } |
| #else | #else |
| #include "compiler.h" | #include "compiler.h" |
| #include "mousemng.h" | #include "mousemng.h" |
| BYTE mousemng_getstat(SINT16 *x, SINT16 *y, int clear) { | BYTE mousemng_getstat(SINT16 *x, SINT16 *y, int clear) { |
| *x = 0; | *x = 0; |
| Line 141 BYTE mousemng_getstat(SINT16 *x, SINT16 | Line 136 BYTE mousemng_getstat(SINT16 *x, SINT16 |
| return(0xa0); | return(0xa0); |
| } | } |
| #endif | |
| #endif | |