dinput/tests: Test that the GUID is the same for Instance and Product.

Signed-off-by: Brendan McGrath <brendan@redmandi.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Brendan McGrath 2018-10-31 21:01:40 +11:00 committed by Alexandre Julliard
parent 73c0ec29eb
commit c357f3670f
2 changed files with 22 additions and 0 deletions

View File

@ -392,6 +392,17 @@ 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";
todo_wine
ok(IsEqualGUID(&instance->guidInstance, &instance->guidProduct),
"%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;
}

View File

@ -377,6 +377,17 @@ 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";
todo_wine
ok(IsEqualGUID(&instance->guidInstance, &instance->guidProduct),
"%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;
}