Diff for /np2/win9x/mousemng.cpp between versions 1.3 and 1.7

version 1.3, 2003/11/04 15:44:59 version 1.7, 2007/11/11 07:11:26
Line 3 Line 3
 #include        "mousemng.h"  #include        "mousemng.h"
   
   
   #define MOUSEMNG_RANGE          128
   
   
 typedef struct {  typedef struct {
         SINT16  x;          SINT16  x;
         SINT16  y;          SINT16  y;
         BYTE    btn;          UINT8   btn;
         UINT    flag;          UINT    flag;
 } MOUSEMNG;  } MOUSEMNG;
   
 static  MOUSEMNG        mousemng;  static  MOUSEMNG        mousemng;
   
   
 BYTE mousemng_getstat(SINT16 *x, SINT16 *y, int clear) {  UINT8 mousemng_getstat(SINT16 *x, SINT16 *y, int clear) {
   
         *x = mousemng.x;          *x = mousemng.x;
         *y = mousemng.y;          *y = mousemng.y;
Line 31  static void getmaincenter(POINT *cp) { Line 34  static void getmaincenter(POINT *cp) {
   
         RECT    rct;          RECT    rct;
   
         GetWindowRect(hWndMain, &rct);          GetWindowRect(g_hWndMain, &rct);
         cp->x = (rct.right + rct.left) / 2;          cp->x = (rct.right + rct.left) / 2;
         cp->y = (rct.bottom + rct.top) / 2;          cp->y = (rct.bottom + rct.top) / 2;
 }  }
Line 42  static void mousecapture(BOOL capture) { Line 45  static void mousecapture(BOOL capture) {
         POINT   cp;          POINT   cp;
         RECT    rct;          RECT    rct;
   
         style = GetClassLong(hWndMain, GCL_STYLE);          style = GetClassLong(g_hWndMain, GCL_STYLE);
         if (capture) {          if (capture) {
                 ShowCursor(FALSE);                  ShowCursor(FALSE);
                 getmaincenter(&cp);                  getmaincenter(&cp);
                 rct.left = cp.x - 200;                  rct.left = cp.x - MOUSEMNG_RANGE;
                 rct.right = cp.x + 200;                  rct.right = cp.x + MOUSEMNG_RANGE;
                 rct.top = cp.y - 200;                  rct.top = cp.y - MOUSEMNG_RANGE;
                 rct.bottom = cp.y + 200;                  rct.bottom = cp.y + MOUSEMNG_RANGE;
                 SetCursorPos(cp.x, cp.y);                  SetCursorPos(cp.x, cp.y);
                 ClipCursor(&rct);                  ClipCursor(&rct);
                 style &= ~(CS_DBLCLKS);                  style &= ~(CS_DBLCLKS);
Line 59  static void mousecapture(BOOL capture) { Line 62  static void mousecapture(BOOL capture) {
                 ClipCursor(NULL);                  ClipCursor(NULL);
                 style |= CS_DBLCLKS;                  style |= CS_DBLCLKS;
         }          }
         SetClassLong(hWndMain, GCL_STYLE, style);          SetClassLong(g_hWndMain, GCL_STYLE, style);
 }  }
   
 void mousemng_initialize(void) {  void mousemng_initialize(void) {
   
         ZeroMemory(&mousemng, sizeof(mousemng));          ZeroMemory(&mousemng, sizeof(mousemng));
         mousemng.btn = uPD8255A_LEFTBIT | uPD8255A_RIGHTBIT;          mousemng.btn = uPD8255A_LEFTBIT | uPD8255A_RIGHTBIT;
         mousemng.flag = (1 << MOUSEPROC_SYSTEM) + (1 << MOUSEPROC_WINUI) +          mousemng.flag = (1 << MOUSEPROC_SYSTEM);
                                                                                                 (1 << MOUSEPROC_BG);  
 }  }
   
 void mousemng_callback(void) {  void mousemng_sync(void) {
   
         POINT   p;          POINT   p;
         POINT   cp;          POINT   cp;

Removed from v.1.3  
changed lines
  Added in v.1.7


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