[DInput] Misc. fixes

Lionel Ulmer lionel.ulmer at free.fr
Sun May 8 02:33:22 CDT 2005


Changelog:
 - Wine reports 0x80 on pressed buttons not 0xFF
 - trace the events reported to the application

-- 
		 Lionel Ulmer - http://www.bbrox.org/
-------------- next part --------------
Index: dlls/dinput/mouse.c
===================================================================
RCS file: /home/wine/wine/dlls/dinput/mouse.c,v
retrieving revision 1.23
diff -u -r1.23 mouse.c
--- dlls/dinput/mouse.c	5 May 2005 10:30:24 -0000	1.23
+++ dlls/dinput/mouse.c	8 May 2005 07:31:27 -0000
@@ -604,9 +604,9 @@
       This->org_coords = point;
     }
     This->m_state.lZ = 0;
-    This->m_state.rgbButtons[0] = ((GetKeyState(VK_LBUTTON) & 0x80) ? 0xFF : 0x00);
-    This->m_state.rgbButtons[1] = ((GetKeyState(VK_RBUTTON) & 0x80) ? 0xFF : 0x00);
-    This->m_state.rgbButtons[2] = ((GetKeyState(VK_MBUTTON) & 0x80) ? 0xFF : 0x00);
+    This->m_state.rgbButtons[0] = GetKeyState(VK_LBUTTON) & 0x80;
+    This->m_state.rgbButtons[1] = GetKeyState(VK_RBUTTON) & 0x80;
+    This->m_state.rgbButtons[2] = GetKeyState(VK_MBUTTON) & 0x80;
     
     /* Install our mouse hook */
     if (This->dwCoopLevel & DISCL_EXCLUSIVE)
@@ -770,12 +770,19 @@
 	}
 	
 	if (len)
-	    TRACE("Application retrieving %ld event(s).\n", len);
+	    TRACE("Application retrieving %ld event(s):\n", len);
 	
 	*entries = 0;
 	nqtail = This->queue_tail;
 	while (len) {
 	    /* Copy the buffered data into the application queue */
+	    TRACE(" - queuing Offs:%2ld Data:%5ld TS:%8ld Seq:%8ld at address %p from queue tail %4d\n",
+		  (This->data_queue)->dwOfs,
+		  (This->data_queue)->dwData,
+		  (This->data_queue)->dwTimeStamp,
+		  (This->data_queue)->dwSequence,
+		  (char *)dod + *entries * dodsize,
+		  nqtail);
 	    memcpy((char *)dod + *entries * dodsize, This->data_queue + nqtail, dodsize);
 	    /* Advance position */
 	    nqtail++;


More information about the wine-patches mailing list