From 233b5f5b8033c907b82d8249a87959b26c29b78c Mon Sep 17 00:00:00 2001 From: Lionel Ulmer Date: Mon, 9 May 2005 09:24:34 +0000 Subject: [PATCH] - Windows reports 0x80 on pressed buttons not 0xFF - trace the events reported to the application --- dlls/dinput/mouse.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/dlls/dinput/mouse.c b/dlls/dinput/mouse.c index b37c3b3833b..b23eb0d3d87 100644 --- a/dlls/dinput/mouse.c +++ b/dlls/dinput/mouse.c @@ -604,9 +604,9 @@ static HRESULT WINAPI SysMouseAImpl_Acquire(LPDIRECTINPUTDEVICE8A iface) 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 @@ static HRESULT WINAPI SysMouseAImpl_GetDeviceData(LPDIRECTINPUTDEVICE8A iface, } 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++;