Commit dd9a30ba authored by Neil Olver's avatar Neil Olver Committed by Alexandre Julliard

The flag for a mouse button down in the structure returned by

GetDeviceState should be 0x80 (only the high bit set), not 0xff.
parent 5ad7d858
...@@ -501,9 +501,9 @@ static LRESULT CALLBACK dinput_mouse_hook( int code, WPARAM wparam, LPARAM lpara ...@@ -501,9 +501,9 @@ static LRESULT CALLBACK dinput_mouse_hook( int code, WPARAM wparam, LPARAM lpara
switch(wparam) { switch(wparam) {
case WM_LBUTTONDOWN: 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++); hook->time, This->dinput->evsequence++);
This->m_state.rgbButtons[0] = 0xFF; This->m_state.rgbButtons[0] = 0x80;
break; break;
case WM_LBUTTONUP: case WM_LBUTTONUP:
GEN_EVENT(This->offset_array[WINE_MOUSE_L_POSITION], 0x00, 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 ...@@ -511,9 +511,9 @@ static LRESULT CALLBACK dinput_mouse_hook( int code, WPARAM wparam, LPARAM lpara
This->m_state.rgbButtons[0] = 0x00; This->m_state.rgbButtons[0] = 0x00;
break; break;
case WM_RBUTTONDOWN: 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++); hook->time, This->dinput->evsequence++);
This->m_state.rgbButtons[1] = 0xFF; This->m_state.rgbButtons[1] = 0x80;
break; break;
case WM_RBUTTONUP: case WM_RBUTTONUP:
GEN_EVENT(This->offset_array[WINE_MOUSE_R_POSITION], 0x00, 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 ...@@ -521,9 +521,9 @@ static LRESULT CALLBACK dinput_mouse_hook( int code, WPARAM wparam, LPARAM lpara
This->m_state.rgbButtons[1] = 0x00; This->m_state.rgbButtons[1] = 0x00;
break; break;
case WM_MBUTTONDOWN: 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++); hook->time, This->dinput->evsequence++);
This->m_state.rgbButtons[2] = 0xFF; This->m_state.rgbButtons[2] = 0x80;
break; break;
case WM_MBUTTONUP: case WM_MBUTTONUP:
GEN_EVENT(This->offset_array[WINE_MOUSE_M_POSITION], 0x00, GEN_EVENT(This->offset_array[WINE_MOUSE_M_POSITION], 0x00,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment