https://git.reactos.org/?p=reactos.git;a=commitdiff;h=a924dfff453add00f2992f...
commit a924dfff453add00f2992fc7f782bec5f68c1216 Author: Amine Khaldi amine.khaldi@reactos.org AuthorDate: Fri Jan 25 13:11:40 2019 +0100 Commit: Amine Khaldi amine.khaldi@reactos.org CommitDate: Fri Jan 25 13:11:40 2019 +0100
[DINPUT_WINETEST] Sync with Wine Staging 4.0. CORE-15682 --- modules/rostests/winetests/dinput/dinput.c | 10 ++++++++++ modules/rostests/winetests/dinput/keyboard.c | 3 +++ 2 files changed, 13 insertions(+)
diff --git a/modules/rostests/winetests/dinput/dinput.c b/modules/rostests/winetests/dinput/dinput.c index 7e2da9ff32..cb7268908c 100644 --- a/modules/rostests/winetests/dinput/dinput.c +++ b/modules/rostests/winetests/dinput/dinput.c @@ -392,6 +392,16 @@ 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"; + 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; } diff --git a/modules/rostests/winetests/dinput/keyboard.c b/modules/rostests/winetests/dinput/keyboard.c index 8ee22fa38e..e8dfb4f484 100644 --- a/modules/rostests/winetests/dinput/keyboard.c +++ b/modules/rostests/winetests/dinput/keyboard.c @@ -411,6 +411,8 @@ static void test_dik_codes(IDirectInputA *dI, HWND hwnd, LANGID langid)
if (!PeekMessageA(&msg, hwnd, 0, 0, PM_REMOVE)) { + U(in).ki.dwFlags = KEYEVENTF_KEYUP; + SendInput(1, &in, sizeof(in)); win_skip("failed to queue keyboard event\n"); break; } @@ -471,6 +473,7 @@ static void keyboard_tests(DWORD version) hwnd = CreateWindowA("static", "Title", WS_OVERLAPPEDWINDOW | WS_VISIBLE, 10, 10, 200, 200, NULL, NULL, NULL, NULL); ok(hwnd != NULL, "err: %d\n", GetLastError()); + SetForegroundWindow( hwnd );
if (hwnd) {