Diff for /np2/macosx/mousemng.cpp between versions 1.2 and 1.5

version 1.2, 2003/10/19 14:48:07 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 28  void mouseonoff(BYTE flg) { Line 30  void mouseonoff(BYTE flg) {
         if ((lastmouse ^ flg) & 1) {          if ((lastmouse ^ flg) & 1) {
                 lastmouse = (flg & 1);                  lastmouse = (flg & 1);
                 if (lastmouse & 1) {                  if (lastmouse & 1) {
             CGDisplayHideCursor(kCGDirectMainDisplay);              HideCursor();
                         getmaincenter(&cp);                          getmaincenter(&cp);
             CGWarpMouseCursorPosition(CGPointMake(cp.h, cp.v));              CGWarpMouseCursorPosition(CGPointMake(cp.h, cp.v));
                 }                  }
         else {          else {
             CGDisplayShowCursor(kCGDirectMainDisplay);              ShowCursor();
         }          }
         }          }
 }  }
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
   

Removed from v.1.2  
changed lines
  Added in v.1.5


RetroPC.NET-CVS <cvs@retropc.net>