Rémi Bernon : dinput8/tests: Add DISCL_EXCLUSIVE / rawinput test.
Alexandre Julliard
julliard at winehq.org
Thu Aug 13 15:11:52 CDT 2020
Module: wine
Branch: master
Commit: 03ad3ca17a2fe81af51718a73e36e5d549245246
URL: https://source.winehq.org/git/wine.git/?a=commit;h=03ad3ca17a2fe81af51718a73e36e5d549245246
Author: Rémi Bernon <rbernon at codeweavers.com>
Date: Mon Aug 10 11:04:14 2020 +0200
dinput8/tests: Add DISCL_EXCLUSIVE / rawinput test.
Signed-off-by: Rémi Bernon <rbernon at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/dinput8/tests/device.c | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/dlls/dinput8/tests/device.c b/dlls/dinput8/tests/device.c
index 328174e579..6fe9a63551 100644
--- a/dlls/dinput8/tests/device.c
+++ b/dlls/dinput8/tests/device.c
@@ -712,6 +712,26 @@ static void test_mouse_keyboard(void)
todo_wine
ok(raw_devices_count == 1, "Unexpected raw devices registered: %d\n", raw_devices_count);
+ IDirectInputDevice8_SetCooperativeLevel(di_mouse, hwnd, DISCL_FOREGROUND|DISCL_EXCLUSIVE);
+ IDirectInputDevice8_SetCooperativeLevel(di_keyboard, hwnd, DISCL_FOREGROUND|DISCL_EXCLUSIVE);
+
+ hr = IDirectInputDevice8_Acquire(di_keyboard);
+ ok(SUCCEEDED(hr), "IDirectInputDevice8_Acquire failed: %08x\n", hr);
+ hr = IDirectInputDevice8_Acquire(di_mouse);
+ ok(SUCCEEDED(hr), "IDirectInputDevice8_Acquire failed: %08x\n", hr);
+ raw_devices_count = ARRAY_SIZE(raw_devices);
+ memset(raw_devices, 0, sizeof(raw_devices));
+ hr = GetRegisteredRawInputDevices(raw_devices, &raw_devices_count, sizeof(RAWINPUTDEVICE));
+ ok(hr == 3, "GetRegisteredRawInputDevices returned %d, raw_devices_count: %d\n", hr, raw_devices_count);
+ todo_wine
+ ok(raw_devices[0].dwFlags == (RIDEV_CAPTUREMOUSE|RIDEV_NOLEGACY), "Unexpected raw device flags: %x\n", raw_devices[0].dwFlags);
+ todo_wine
+ ok(raw_devices[2].dwFlags == (RIDEV_NOHOTKEYS|RIDEV_NOLEGACY), "Unexpected raw device flags: %x\n", raw_devices[1].dwFlags);
+ hr = IDirectInputDevice8_Unacquire(di_keyboard);
+ ok(SUCCEEDED(hr), "IDirectInputDevice8_Acquire failed: %08x\n", hr);
+ hr = IDirectInputDevice8_Unacquire(di_mouse);
+ ok(SUCCEEDED(hr), "IDirectInputDevice8_Acquire failed: %08x\n", hr);
+
raw_devices_count = ARRAY_SIZE(raw_devices);
hr = GetRegisteredRawInputDevices(raw_devices, &raw_devices_count, sizeof(RAWINPUTDEVICE));
todo_wine
More information about the wine-cvs
mailing list