From dd9a30ba466950dbd0dfd1d36bcea311df07b12f Mon Sep 17 00:00:00 2001 From: Neil Olver Date: Mon, 27 Dec 2004 16:55:41 +0000 Subject: [PATCH] The flag for a mouse button down in the structure returned by GetDeviceState should be 0x80 (only the high bit set), not 0xff. --- dlls/dinput/mouse.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/dlls/dinput/mouse.c b/dlls/dinput/mouse.c index 9bddd648c5..1945240b5b 100644 --- a/dlls/dinput/mouse.c +++ b/dlls/dinput/mouse.c @@ -501,9 +501,9 @@ static LRESULT CALLBACK dinput_mouse_hook( int code, WPARAM wparam, LPARAM lpara switch(wparam) { case WM_LBUTTONDOWN: - GEN_EVENT(This->offset_array[WINE_MOUSE_L_POSITION], 0xFF, + GEN_EVENT(This->offset_array[WINE_MOUSE_L_POSITION], 0x80, hook->time, This->dinput->evsequence++); - This->m_state.rgbButtons[0] = 0xFF; + This->m_state.rgbButtons[0] = 0x80; break; case WM_LBUTTONUP: GEN_EVENT(This->offset_array[WINE_MOUSE_L_POSITION], 0x00, @@ -511,9 +511,9 @@ static LRESULT CALLBACK dinput_mouse_hook( int code, WPARAM wparam, LPARAM lpara This->m_state.rgbButtons[0] = 0x00; break; case WM_RBUTTONDOWN: - GEN_EVENT(This->offset_array[WINE_MOUSE_R_POSITION], 0xFF, + GEN_EVENT(This->offset_array[WINE_MOUSE_R_POSITION], 0x80, hook->time, This->dinput->evsequence++); - This->m_state.rgbButtons[1] = 0xFF; + This->m_state.rgbButtons[1] = 0x80; break; case WM_RBUTTONUP: GEN_EVENT(This->offset_array[WINE_MOUSE_R_POSITION], 0x00, @@ -521,9 +521,9 @@ static LRESULT CALLBACK dinput_mouse_hook( int code, WPARAM wparam, LPARAM lpara This->m_state.rgbButtons[1] = 0x00; break; case WM_MBUTTONDOWN: - GEN_EVENT(This->offset_array[WINE_MOUSE_M_POSITION], 0xFF, + GEN_EVENT(This->offset_array[WINE_MOUSE_M_POSITION], 0x80, hook->time, This->dinput->evsequence++); - This->m_state.rgbButtons[2] = 0xFF; + This->m_state.rgbButtons[2] = 0x80; break; case WM_MBUTTONUP: GEN_EVENT(This->offset_array[WINE_MOUSE_M_POSITION], 0x00, -- 2.32.0.93.g670b81a890