These tests ensure the Instance GUID and Product GUIDs are the same for keyboard and mouse.
Signed-off-by: Brendan McGrath brendan@redmandi.com --- Changes since v3: - fix test output on failure (was printing guidProduct twice)
dlls/dinput/tests/dinput.c | 13 +++++++++++++ dlls/dinput8/tests/dinput.c | 13 +++++++++++++ 2 files changed, 26 insertions(+)
diff --git a/dlls/dinput/tests/dinput.c b/dlls/dinput/tests/dinput.c index 7e2da9ff32..6eec038a35 100644 --- a/dlls/dinput/tests/dinput.c +++ b/dlls/dinput/tests/dinput.c @@ -392,6 +392,19 @@ static BOOL CALLBACK enum_devices_callback(const DIDEVICEINSTANCEA *instance, vo { struct enum_devices_test *enum_test = context;
+ if ((instance->dwDevType & 0xff) == DIDEVTYPE_KEYBOARD || + (instance->dwDevType & 0xff) == DIDEVTYPE_MOUSE) { + const char *device = ((instance->dwDevType & 0xff) == + DIDEVTYPE_KEYBOARD) ? "Keyboard" : "Mouse"; + int cmp = memcmp(&instance->guidInstance, + &instance->guidProduct, + sizeof(instance->guidInstance)); + ok(cmp == 0, "%s guidInstance (%s) does not match guidProduct (%s)\n", + device, + wine_dbgstr_guid(&instance->guidInstance), + wine_dbgstr_guid(&instance->guidProduct)); + } + enum_test->device_count++; return enum_test->return_value; } diff --git a/dlls/dinput8/tests/dinput.c b/dlls/dinput8/tests/dinput.c index b093437096..4eabb58c61 100644 --- a/dlls/dinput8/tests/dinput.c +++ b/dlls/dinput8/tests/dinput.c @@ -377,6 +377,19 @@ static BOOL CALLBACK enum_devices_callback(const DIDEVICEINSTANCEA *instance, vo instance->wUsagePage, instance->wUsage);
+ if ((instance->dwDevType & 0xff) == DI8DEVTYPE_KEYBOARD || + (instance->dwDevType & 0xff) == DI8DEVTYPE_MOUSE) { + const char *device = ((instance->dwDevType & 0xff) == + DI8DEVTYPE_KEYBOARD) ? "Keyboard" : "Mouse"; + int cmp = memcmp(&instance->guidInstance, + &instance->guidProduct, + sizeof(instance->guidInstance)); + ok(cmp == 0, "%s guidInstance (%s) does not match guidProduct (%s)\n", + device, + wine_dbgstr_guid(&instance->guidInstance), + wine_dbgstr_guid(&instance->guidProduct)); + } + enum_test->device_count++; return enum_test->return_value; }
This matches the behaviour of DirectInput8 native and appears to be required for some games to recognise the mouse and keyboard as a mouse and keyboard.
Signed-off-by: Brendan McGrath brendan@redmandi.com --- Changes since v3: - fix test output on failure (was printing guidProduct twice)
dlls/dinput/device_private.h | 3 --- dlls/dinput/dinput_main.c | 6 ++---- dlls/dinput/keyboard.c | 11 +++-------- dlls/dinput/mouse.c | 11 +++-------- 4 files changed, 8 insertions(+), 23 deletions(-)
diff --git a/dlls/dinput/device_private.h b/dlls/dinput/device_private.h index 52bbec4490..d9e2997eaa 100644 --- a/dlls/dinput/device_private.h +++ b/dlls/dinput/device_private.h @@ -114,9 +114,6 @@ typedef struct LPDIRECTINPUTEFFECT ref; } effect_list_item;
-extern const GUID DInput_Wine_Keyboard_GUID DECLSPEC_HIDDEN; -extern const GUID DInput_Wine_Mouse_GUID DECLSPEC_HIDDEN; - /* Various debug tools */ extern void _dump_DIPROPHEADER(LPCDIPROPHEADER diph) DECLSPEC_HIDDEN; extern void _dump_OBJECTINSTANCEA(const DIDEVICEOBJECTINSTANCEA *ddoi) DECLSPEC_HIDDEN; diff --git a/dlls/dinput/dinput_main.c b/dlls/dinput/dinput_main.c index 28e192af4e..6ed764e748 100644 --- a/dlls/dinput/dinput_main.c +++ b/dlls/dinput/dinput_main.c @@ -1747,12 +1747,10 @@ static DWORD WINAPI hook_thread_proc(void *param) { if (!dev->acquired || !dev->event_proc) continue;
- if (IsEqualGUID( &dev->guid, &GUID_SysKeyboard ) || - IsEqualGUID( &dev->guid, &DInput_Wine_Keyboard_GUID )) + if (IsEqualGUID( &dev->guid, &GUID_SysKeyboard )) kbd_cnt++; else - if (IsEqualGUID( &dev->guid, &GUID_SysMouse ) || - IsEqualGUID( &dev->guid, &DInput_Wine_Mouse_GUID )) + if (IsEqualGUID( &dev->guid, &GUID_SysMouse )) mice_cnt++; } LeaveCriticalSection( &dinput->crit ); diff --git a/dlls/dinput/keyboard.c b/dlls/dinput/keyboard.c index a64c59c603..642d0c0beb 100644 --- a/dlls/dinput/keyboard.c +++ b/dlls/dinput/keyboard.c @@ -145,10 +145,6 @@ static int KeyboardCallback( LPDIRECTINPUTDEVICE8A iface, WPARAM wparam, LPARAM return ret; }
-const GUID DInput_Wine_Keyboard_GUID = { /* 0ab8648a-7735-11d2-8c73-71df54a96441 */ - 0x0ab8648a, 0x7735, 0x11d2, {0x8c, 0x73, 0x71, 0xdf, 0x54, 0xa9, 0x64, 0x41} -}; - static DWORD get_keyboard_subtype(void) { DWORD kbd_type, kbd_subtype, dev_subtype; @@ -179,7 +175,7 @@ static void fill_keyboard_dideviceinstanceA(LPDIDEVICEINSTANCEA lpddi, DWORD ver
ddi.dwSize = dwSize; ddi.guidInstance = GUID_SysKeyboard;/* DInput's GUID */ - ddi.guidProduct = DInput_Wine_Keyboard_GUID; /* Vendor's GUID */ + ddi.guidProduct = GUID_SysKeyboard; if (version >= 0x0800) ddi.dwDevType = DI8DEVTYPE_KEYBOARD | (subtype << 8); else @@ -203,7 +199,7 @@ static void fill_keyboard_dideviceinstanceW(LPDIDEVICEINSTANCEW lpddi, DWORD ver
ddi.dwSize = dwSize; ddi.guidInstance = GUID_SysKeyboard;/* DInput's GUID */ - ddi.guidProduct = DInput_Wine_Keyboard_GUID; /* Vendor's GUID */ + ddi.guidProduct = GUID_SysKeyboard; if (version >= 0x0800) ddi.dwDevType = DI8DEVTYPE_KEYBOARD | (subtype << 8); else @@ -308,8 +304,7 @@ static HRESULT keyboarddev_create_device(IDirectInputImpl *dinput, REFGUID rguid TRACE("%p %s %s %p %i\n", dinput, debugstr_guid(rguid), debugstr_guid(riid), pdev, unicode); *pdev = NULL;
- if (IsEqualGUID(&GUID_SysKeyboard, rguid) || /* Generic Keyboard */ - IsEqualGUID(&DInput_Wine_Keyboard_GUID, rguid)) /* Wine Keyboard */ + if (IsEqualGUID(&GUID_SysKeyboard, rguid)) /* Wine Keyboard */ { SysKeyboardImpl *This;
diff --git a/dlls/dinput/mouse.c b/dlls/dinput/mouse.c index 6d3eff5d52..7133359351 100644 --- a/dlls/dinput/mouse.c +++ b/dlls/dinput/mouse.c @@ -93,10 +93,6 @@ static inline IDirectInputDevice8W *IDirectInputDevice8W_from_impl(SysMouseImpl
static int dinput_mouse_hook( LPDIRECTINPUTDEVICE8A iface, WPARAM wparam, LPARAM lparam );
-const GUID DInput_Wine_Mouse_GUID = { /* 9e573ed8-7734-11d2-8d4a-23903fb6bdf7 */ - 0x9e573ed8, 0x7734, 0x11d2, {0x8d, 0x4a, 0x23, 0x90, 0x3f, 0xb6, 0xbd, 0xf7} -}; - static void _dump_mouse_state(const DIMOUSESTATE2 *m_state) { int i; @@ -121,7 +117,7 @@ static void fill_mouse_dideviceinstanceA(LPDIDEVICEINSTANCEA lpddi, DWORD versio
ddi.dwSize = dwSize; ddi.guidInstance = GUID_SysMouse;/* DInput's GUID */ - ddi.guidProduct = DInput_Wine_Mouse_GUID; /* Vendor's GUID */ + ddi.guidProduct = GUID_SysMouse; if (version >= 0x0800) ddi.dwDevType = DI8DEVTYPE_MOUSE | (DI8DEVTYPEMOUSE_TRADITIONAL << 8); else @@ -145,7 +141,7 @@ static void fill_mouse_dideviceinstanceW(LPDIDEVICEINSTANCEW lpddi, DWORD versio
ddi.dwSize = dwSize; ddi.guidInstance = GUID_SysMouse;/* DInput's GUID */ - ddi.guidProduct = DInput_Wine_Mouse_GUID; /* Vendor's GUID */ + ddi.guidProduct = GUID_SysMouse; if (version >= 0x0800) ddi.dwDevType = DI8DEVTYPE_MOUSE | (DI8DEVTYPEMOUSE_TRADITIONAL << 8); else @@ -257,8 +253,7 @@ static HRESULT mousedev_create_device(IDirectInputImpl *dinput, REFGUID rguid, R TRACE("%p %s %s %p %i\n", dinput, debugstr_guid(rguid), debugstr_guid(riid), pdev, unicode); *pdev = NULL;
- if (IsEqualGUID(&GUID_SysMouse, rguid) || /* Generic Mouse */ - IsEqualGUID(&DInput_Wine_Mouse_GUID, rguid)) /* Wine Mouse */ + if (IsEqualGUID(&GUID_SysMouse, rguid)) /* Wine Mouse */ { SysMouseImpl *This;
Hi,
While running your changed tests on Windows, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=43706
Your paranoid android.
=== debian9 (32 bit Wine report) ===
dinput8: dinput.c:387: Test failed: Mouse guidInstance ({6f1d2b60-d5a0-11cf-bfc7-444553540000}) does not match guidProduct ({9e573ed8-7734-11d2-8d4a-23903fb6bdf7}) dinput.c:387: Test failed: Keyboard guidInstance ({6f1d2b61-d5a0-11cf-bfc7-444553540000}) does not match guidProduct ({0ab8648a-7735-11d2-8c73-71df54a96441}) dinput.c:387: Test failed: Mouse guidInstance ({6f1d2b60-d5a0-11cf-bfc7-444553540000}) does not match guidProduct ({9e573ed8-7734-11d2-8d4a-23903fb6bdf7}) dinput.c:387: Test failed: Keyboard guidInstance ({6f1d2b61-d5a0-11cf-bfc7-444553540000}) does not match guidProduct ({0ab8648a-7735-11d2-8c73-71df54a96441}) dinput.c:387: Test failed: Mouse guidInstance ({6f1d2b60-d5a0-11cf-bfc7-444553540000}) does not match guidProduct ({9e573ed8-7734-11d2-8d4a-23903fb6bdf7})
dinput: dinput.c:402: Test failed: Mouse guidInstance ({6f1d2b60-d5a0-11cf-bfc7-444553540000}) does not match guidProduct ({9e573ed8-7734-11d2-8d4a-23903fb6bdf7}) dinput.c:402: Test failed: Keyboard guidInstance ({6f1d2b61-d5a0-11cf-bfc7-444553540000}) does not match guidProduct ({0ab8648a-7735-11d2-8c73-71df54a96441}) dinput.c:402: Test failed: Mouse guidInstance ({6f1d2b60-d5a0-11cf-bfc7-444553540000}) does not match guidProduct ({9e573ed8-7734-11d2-8d4a-23903fb6bdf7}) dinput.c:402: Test failed: Keyboard guidInstance ({6f1d2b61-d5a0-11cf-bfc7-444553540000}) does not match guidProduct ({0ab8648a-7735-11d2-8c73-71df54a96441}) dinput.c:402: Test failed: Mouse guidInstance ({6f1d2b60-d5a0-11cf-bfc7-444553540000}) does not match guidProduct ({9e573ed8-7734-11d2-8d4a-23903fb6bdf7})
=== debian9 (build log) ===
=== debian9 (32 bit WoW Wine report) ===
dinput8: dinput.c:387: Test failed: Mouse guidInstance ({6f1d2b60-d5a0-11cf-bfc7-444553540000}) does not match guidProduct ({9e573ed8-7734-11d2-8d4a-23903fb6bdf7}) dinput.c:387: Test failed: Keyboard guidInstance ({6f1d2b61-d5a0-11cf-bfc7-444553540000}) does not match guidProduct ({0ab8648a-7735-11d2-8c73-71df54a96441}) dinput.c:387: Test failed: Mouse guidInstance ({6f1d2b60-d5a0-11cf-bfc7-444553540000}) does not match guidProduct ({9e573ed8-7734-11d2-8d4a-23903fb6bdf7}) dinput.c:387: Test failed: Keyboard guidInstance ({6f1d2b61-d5a0-11cf-bfc7-444553540000}) does not match guidProduct ({0ab8648a-7735-11d2-8c73-71df54a96441}) dinput.c:387: Test failed: Mouse guidInstance ({6f1d2b60-d5a0-11cf-bfc7-444553540000}) does not match guidProduct ({9e573ed8-7734-11d2-8d4a-23903fb6bdf7})
dinput: dinput.c:402: Test failed: Mouse guidInstance ({6f1d2b60-d5a0-11cf-bfc7-444553540000}) does not match guidProduct ({9e573ed8-7734-11d2-8d4a-23903fb6bdf7}) dinput.c:402: Test failed: Keyboard guidInstance ({6f1d2b61-d5a0-11cf-bfc7-444553540000}) does not match guidProduct ({0ab8648a-7735-11d2-8c73-71df54a96441}) dinput.c:402: Test failed: Mouse guidInstance ({6f1d2b60-d5a0-11cf-bfc7-444553540000}) does not match guidProduct ({9e573ed8-7734-11d2-8d4a-23903fb6bdf7}) dinput.c:402: Test failed: Keyboard guidInstance ({6f1d2b61-d5a0-11cf-bfc7-444553540000}) does not match guidProduct ({0ab8648a-7735-11d2-8c73-71df54a96441}) dinput.c:402: Test failed: Mouse guidInstance ({6f1d2b60-d5a0-11cf-bfc7-444553540000}) does not match guidProduct ({9e573ed8-7734-11d2-8d4a-23903fb6bdf7})
=== debian9 (64 bit Wow Wine report) ===
dinput8: dinput.c:387: Test failed: Mouse guidInstance ({6f1d2b60-d5a0-11cf-bfc7-444553540000}) does not match guidProduct ({9e573ed8-7734-11d2-8d4a-23903fb6bdf7}) dinput.c:387: Test failed: Keyboard guidInstance ({6f1d2b61-d5a0-11cf-bfc7-444553540000}) does not match guidProduct ({0ab8648a-7735-11d2-8c73-71df54a96441}) dinput.c:387: Test failed: Mouse guidInstance ({6f1d2b60-d5a0-11cf-bfc7-444553540000}) does not match guidProduct ({9e573ed8-7734-11d2-8d4a-23903fb6bdf7}) dinput.c:387: Test failed: Keyboard guidInstance ({6f1d2b61-d5a0-11cf-bfc7-444553540000}) does not match guidProduct ({0ab8648a-7735-11d2-8c73-71df54a96441}) dinput.c:387: Test failed: Mouse guidInstance ({6f1d2b60-d5a0-11cf-bfc7-444553540000}) does not match guidProduct ({9e573ed8-7734-11d2-8d4a-23903fb6bdf7})
dinput: dinput.c:402: Test failed: Mouse guidInstance ({6f1d2b60-d5a0-11cf-bfc7-444553540000}) does not match guidProduct ({9e573ed8-7734-11d2-8d4a-23903fb6bdf7}) dinput.c:402: Test failed: Keyboard guidInstance ({6f1d2b61-d5a0-11cf-bfc7-444553540000}) does not match guidProduct ({0ab8648a-7735-11d2-8c73-71df54a96441}) dinput.c:402: Test failed: Mouse guidInstance ({6f1d2b60-d5a0-11cf-bfc7-444553540000}) does not match guidProduct ({9e573ed8-7734-11d2-8d4a-23903fb6bdf7}) dinput.c:402: Test failed: Keyboard guidInstance ({6f1d2b61-d5a0-11cf-bfc7-444553540000}) does not match guidProduct ({0ab8648a-7735-11d2-8c73-71df54a96441}) dinput.c:402: Test failed: Mouse guidInstance ({6f1d2b60-d5a0-11cf-bfc7-444553540000}) does not match guidProduct ({9e573ed8-7734-11d2-8d4a-23903fb6bdf7})
=== debian9 (build log) ===
These tests ensure the Instance GUID and Product GUIDs are the same for keyboard and mouse.
Signed-off-by: Brendan McGrath brendan@redmandi.com --- Changes since v4: - Add todo_wine in 1/2 - Remove todo_wine in 2/2
dlls/dinput/tests/dinput.c | 14 ++++++++++++++ dlls/dinput8/tests/dinput.c | 14 ++++++++++++++ 2 files changed, 28 insertions(+)
diff --git a/dlls/dinput/tests/dinput.c b/dlls/dinput/tests/dinput.c index 7e2da9ff32d..650252ba09d 100644 --- a/dlls/dinput/tests/dinput.c +++ b/dlls/dinput/tests/dinput.c @@ -392,6 +392,20 @@ static BOOL CALLBACK enum_devices_callback(const DIDEVICEINSTANCEA *instance, vo { struct enum_devices_test *enum_test = context;
+ if ((instance->dwDevType & 0xff) == DIDEVTYPE_KEYBOARD || + (instance->dwDevType & 0xff) == DIDEVTYPE_MOUSE) { + const char *device = ((instance->dwDevType & 0xff) == + DIDEVTYPE_KEYBOARD) ? "Keyboard" : "Mouse"; + int cmp = memcmp(&instance->guidInstance, + &instance->guidProduct, + sizeof(instance->guidInstance)); + todo_wine + ok(cmp == 0, "%s guidInstance (%s) does not match guidProduct (%s)\n", + device, + wine_dbgstr_guid(&instance->guidInstance), + wine_dbgstr_guid(&instance->guidProduct)); + } + enum_test->device_count++; return enum_test->return_value; } diff --git a/dlls/dinput8/tests/dinput.c b/dlls/dinput8/tests/dinput.c index b093437096d..9d342dee3dd 100644 --- a/dlls/dinput8/tests/dinput.c +++ b/dlls/dinput8/tests/dinput.c @@ -377,6 +377,20 @@ static BOOL CALLBACK enum_devices_callback(const DIDEVICEINSTANCEA *instance, vo instance->wUsagePage, instance->wUsage);
+ if ((instance->dwDevType & 0xff) == DI8DEVTYPE_KEYBOARD || + (instance->dwDevType & 0xff) == DI8DEVTYPE_MOUSE) { + const char *device = ((instance->dwDevType & 0xff) == + DI8DEVTYPE_KEYBOARD) ? "Keyboard" : "Mouse"; + int cmp = memcmp(&instance->guidInstance, + &instance->guidProduct, + sizeof(instance->guidInstance)); + todo_wine + ok(cmp == 0, "%s guidInstance (%s) does not match guidProduct (%s)\n", + device, + wine_dbgstr_guid(&instance->guidInstance), + wine_dbgstr_guid(&instance->guidProduct)); + } + enum_test->device_count++; return enum_test->return_value; }
This matches the behaviour of DirectInput8 native and appears to be required for some games to recognise the mouse and keyboard as a mouse and keyboard.
Signed-off-by: Brendan McGrath brendan@redmandi.com --- Changes since v4: - Add todo_wine in 1/2 - Remove todo_wine in 2/2
dlls/dinput/device_private.h | 3 --- dlls/dinput/dinput_main.c | 6 ++---- dlls/dinput/keyboard.c | 11 +++-------- dlls/dinput/mouse.c | 11 +++-------- dlls/dinput/tests/dinput.c | 1 - dlls/dinput8/tests/dinput.c | 1 - 6 files changed, 8 insertions(+), 25 deletions(-)
diff --git a/dlls/dinput/device_private.h b/dlls/dinput/device_private.h index 52bbec4490a..d9e2997eaaf 100644 --- a/dlls/dinput/device_private.h +++ b/dlls/dinput/device_private.h @@ -114,9 +114,6 @@ typedef struct LPDIRECTINPUTEFFECT ref; } effect_list_item;
-extern const GUID DInput_Wine_Keyboard_GUID DECLSPEC_HIDDEN; -extern const GUID DInput_Wine_Mouse_GUID DECLSPEC_HIDDEN; - /* Various debug tools */ extern void _dump_DIPROPHEADER(LPCDIPROPHEADER diph) DECLSPEC_HIDDEN; extern void _dump_OBJECTINSTANCEA(const DIDEVICEOBJECTINSTANCEA *ddoi) DECLSPEC_HIDDEN; diff --git a/dlls/dinput/dinput_main.c b/dlls/dinput/dinput_main.c index 28e192af4eb..6ed764e7485 100644 --- a/dlls/dinput/dinput_main.c +++ b/dlls/dinput/dinput_main.c @@ -1747,12 +1747,10 @@ static DWORD WINAPI hook_thread_proc(void *param) { if (!dev->acquired || !dev->event_proc) continue;
- if (IsEqualGUID( &dev->guid, &GUID_SysKeyboard ) || - IsEqualGUID( &dev->guid, &DInput_Wine_Keyboard_GUID )) + if (IsEqualGUID( &dev->guid, &GUID_SysKeyboard )) kbd_cnt++; else - if (IsEqualGUID( &dev->guid, &GUID_SysMouse ) || - IsEqualGUID( &dev->guid, &DInput_Wine_Mouse_GUID )) + if (IsEqualGUID( &dev->guid, &GUID_SysMouse )) mice_cnt++; } LeaveCriticalSection( &dinput->crit ); diff --git a/dlls/dinput/keyboard.c b/dlls/dinput/keyboard.c index a64c59c6036..642d0c0beb8 100644 --- a/dlls/dinput/keyboard.c +++ b/dlls/dinput/keyboard.c @@ -145,10 +145,6 @@ static int KeyboardCallback( LPDIRECTINPUTDEVICE8A iface, WPARAM wparam, LPARAM return ret; }
-const GUID DInput_Wine_Keyboard_GUID = { /* 0ab8648a-7735-11d2-8c73-71df54a96441 */ - 0x0ab8648a, 0x7735, 0x11d2, {0x8c, 0x73, 0x71, 0xdf, 0x54, 0xa9, 0x64, 0x41} -}; - static DWORD get_keyboard_subtype(void) { DWORD kbd_type, kbd_subtype, dev_subtype; @@ -179,7 +175,7 @@ static void fill_keyboard_dideviceinstanceA(LPDIDEVICEINSTANCEA lpddi, DWORD ver
ddi.dwSize = dwSize; ddi.guidInstance = GUID_SysKeyboard;/* DInput's GUID */ - ddi.guidProduct = DInput_Wine_Keyboard_GUID; /* Vendor's GUID */ + ddi.guidProduct = GUID_SysKeyboard; if (version >= 0x0800) ddi.dwDevType = DI8DEVTYPE_KEYBOARD | (subtype << 8); else @@ -203,7 +199,7 @@ static void fill_keyboard_dideviceinstanceW(LPDIDEVICEINSTANCEW lpddi, DWORD ver
ddi.dwSize = dwSize; ddi.guidInstance = GUID_SysKeyboard;/* DInput's GUID */ - ddi.guidProduct = DInput_Wine_Keyboard_GUID; /* Vendor's GUID */ + ddi.guidProduct = GUID_SysKeyboard; if (version >= 0x0800) ddi.dwDevType = DI8DEVTYPE_KEYBOARD | (subtype << 8); else @@ -308,8 +304,7 @@ static HRESULT keyboarddev_create_device(IDirectInputImpl *dinput, REFGUID rguid TRACE("%p %s %s %p %i\n", dinput, debugstr_guid(rguid), debugstr_guid(riid), pdev, unicode); *pdev = NULL;
- if (IsEqualGUID(&GUID_SysKeyboard, rguid) || /* Generic Keyboard */ - IsEqualGUID(&DInput_Wine_Keyboard_GUID, rguid)) /* Wine Keyboard */ + if (IsEqualGUID(&GUID_SysKeyboard, rguid)) /* Wine Keyboard */ { SysKeyboardImpl *This;
diff --git a/dlls/dinput/mouse.c b/dlls/dinput/mouse.c index 6d3eff5d525..71333593515 100644 --- a/dlls/dinput/mouse.c +++ b/dlls/dinput/mouse.c @@ -93,10 +93,6 @@ static inline IDirectInputDevice8W *IDirectInputDevice8W_from_impl(SysMouseImpl
static int dinput_mouse_hook( LPDIRECTINPUTDEVICE8A iface, WPARAM wparam, LPARAM lparam );
-const GUID DInput_Wine_Mouse_GUID = { /* 9e573ed8-7734-11d2-8d4a-23903fb6bdf7 */ - 0x9e573ed8, 0x7734, 0x11d2, {0x8d, 0x4a, 0x23, 0x90, 0x3f, 0xb6, 0xbd, 0xf7} -}; - static void _dump_mouse_state(const DIMOUSESTATE2 *m_state) { int i; @@ -121,7 +117,7 @@ static void fill_mouse_dideviceinstanceA(LPDIDEVICEINSTANCEA lpddi, DWORD versio
ddi.dwSize = dwSize; ddi.guidInstance = GUID_SysMouse;/* DInput's GUID */ - ddi.guidProduct = DInput_Wine_Mouse_GUID; /* Vendor's GUID */ + ddi.guidProduct = GUID_SysMouse; if (version >= 0x0800) ddi.dwDevType = DI8DEVTYPE_MOUSE | (DI8DEVTYPEMOUSE_TRADITIONAL << 8); else @@ -145,7 +141,7 @@ static void fill_mouse_dideviceinstanceW(LPDIDEVICEINSTANCEW lpddi, DWORD versio
ddi.dwSize = dwSize; ddi.guidInstance = GUID_SysMouse;/* DInput's GUID */ - ddi.guidProduct = DInput_Wine_Mouse_GUID; /* Vendor's GUID */ + ddi.guidProduct = GUID_SysMouse; if (version >= 0x0800) ddi.dwDevType = DI8DEVTYPE_MOUSE | (DI8DEVTYPEMOUSE_TRADITIONAL << 8); else @@ -257,8 +253,7 @@ static HRESULT mousedev_create_device(IDirectInputImpl *dinput, REFGUID rguid, R TRACE("%p %s %s %p %i\n", dinput, debugstr_guid(rguid), debugstr_guid(riid), pdev, unicode); *pdev = NULL;
- if (IsEqualGUID(&GUID_SysMouse, rguid) || /* Generic Mouse */ - IsEqualGUID(&DInput_Wine_Mouse_GUID, rguid)) /* Wine Mouse */ + if (IsEqualGUID(&GUID_SysMouse, rguid)) /* Wine Mouse */ { SysMouseImpl *This;
diff --git a/dlls/dinput/tests/dinput.c b/dlls/dinput/tests/dinput.c index 650252ba09d..6eec038a357 100644 --- a/dlls/dinput/tests/dinput.c +++ b/dlls/dinput/tests/dinput.c @@ -399,7 +399,6 @@ static BOOL CALLBACK enum_devices_callback(const DIDEVICEINSTANCEA *instance, vo int cmp = memcmp(&instance->guidInstance, &instance->guidProduct, sizeof(instance->guidInstance)); - todo_wine ok(cmp == 0, "%s guidInstance (%s) does not match guidProduct (%s)\n", device, wine_dbgstr_guid(&instance->guidInstance), diff --git a/dlls/dinput8/tests/dinput.c b/dlls/dinput8/tests/dinput.c index 9d342dee3dd..4eabb58c61b 100644 --- a/dlls/dinput8/tests/dinput.c +++ b/dlls/dinput8/tests/dinput.c @@ -384,7 +384,6 @@ static BOOL CALLBACK enum_devices_callback(const DIDEVICEINSTANCEA *instance, vo int cmp = memcmp(&instance->guidInstance, &instance->guidProduct, sizeof(instance->guidInstance)); - todo_wine ok(cmp == 0, "%s guidInstance (%s) does not match guidProduct (%s)\n", device, wine_dbgstr_guid(&instance->guidInstance),