Re: int 33

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Sorry forgot the file.

Nog wrote:

 > With this patch I can get into the copy protection screen in monkey
 > island 2 but the keyboard still doesn't work.
 >
 > Changelog:
 > * dlls/winedos/int33.c
 >      Implement function number 0x5 (Return mouse button press
 > information)
 >
 > nog
 >
 > P.S. Does anyone know how the Mouse motion counters (function 0xb) work?
 >
 >
 >
 >
 >



Index: dlls/winedos/int33.c
===================================================================
RCS file: /home/wine/wine/dlls/winedos/int33.c,v
retrieving revision 1.1
diff -u -r1.1 int33.c
--- dlls/winedos/int33.c	2001/12/04 19:54:45	1.1
+++ dlls/winedos/int33.c	2002/01/26 15:17:29
@@ -19,6 +19,7 @@
 static struct
 {
   DWORD x, y, but;
+  WORD lbcount, rbcount, rlastx, rlasty, llastx, llasty;
   FARPROC16 callback;
   WORD callmask;
 } mouse_info;
@@ -52,6 +53,22 @@
   case 0x04:
     FIXME("Position mouse cursor\n");
     break;
+  case 0x05:
+    TRACE("Return Mouse button press Information for %s mouse button\n",
+          BX_reg(context) ? "right" : "left");
+    if (BX_reg(context)) {
+      BX_reg(context) = mouse_info.rbcount;
+      mouse_info.rbcount = 0;
+      CX_reg(context) = mouse_info.rlastx;
+      DX_reg(context) = mouse_info.rlasty;
+    } else {
+      BX_reg(context) = mouse_info.lbcount;
+      mouse_info.lbcount = 0;
+      CX_reg(context) = mouse_info.llastx;
+      DX_reg(context) = mouse_info.llasty;
+    }
+    AX_reg(context) = mouse_info.but;
+    break;
   case 0x07:
     FIXME("Define horizontal mouse cursor range\n");
     break;
@@ -106,7 +123,8 @@
 
   if (!VGA_GetMode(&Height,&Width,NULL)) {
     /* may need to do some coordinate scaling */
-    SX = 640/Width;
+    if (Width) 
+      SX = 640/Width;
     if (!SX) SX=1;
   }
   mouse_info.x = LOWORD(lParam) * SX;
@@ -119,6 +137,9 @@
   case WM_LBUTTONDBLCLK:
     mouse_info.but |= 0x01;
     mask |= 0x02;
+    mouse_info.llastx = mouse_info.x;
+    mouse_info.llasty = mouse_info.y;
+    mouse_info.lbcount++;
     break;
   case WM_LBUTTONUP:
     mouse_info.but &= ~0x01;
@@ -128,6 +149,9 @@
   case WM_RBUTTONDBLCLK:
     mouse_info.but |= 0x02;
     mask |= 0x08;
+    mouse_info.rlastx = mouse_info.x;
+    mouse_info.rlasty = mouse_info.y;
+    mouse_info.rbcount++;
     break;
   case WM_RBUTTONUP:
     mouse_info.but &= ~0x02;


[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux