Author: akhaldi
Date: Tue Jul 21 23:23:09 2015
New Revision: 68520
URL:
http://svn.reactos.org/svn/reactos?rev=68520&view=rev
Log:
[DINPUT_WINETEST] Sync with Wine Staging 1.7.47. CORE-9924
Modified:
trunk/rostests/winetests/dinput/joystick.c
trunk/rostests/winetests/dinput/keyboard.c
Modified: trunk/rostests/winetests/dinput/joystick.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/dinput/joystick…
==============================================================================
--- trunk/rostests/winetests/dinput/joystick.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/dinput/joystick.c [iso-8859-1] Tue Jul 21 23:23:09 2015
@@ -540,7 +540,6 @@
dip_gain_set.diph.dwHeaderSize = sizeof(DIPROPHEADER);
dip_gain_set.diph.dwObj = 0;
dip_gain_set.diph.dwHow = DIPH_DEVICE;
- dip_gain_set.dwData = 10000;
dip_gain_get.diph.dwSize = sizeof(DIPROPDWORD);
dip_gain_get.diph.dwHeaderSize = sizeof(DIPROPHEADER);
dip_gain_get.diph.dwObj = 0;
Modified: trunk/rostests/winetests/dinput/keyboard.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/dinput/keyboard…
==============================================================================
--- trunk/rostests/winetests/dinput/keyboard.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/dinput/keyboard.c [iso-8859-1] Tue Jul 21 23:23:09 2015
@@ -95,6 +95,27 @@
for (i = 0; i < sizeof(custom_state) / sizeof(custom_state[0]); i++)
ok(custom_state[i] == 0, "Should be zeroed, got 0x%08x\n",
custom_state[i]);
+ /* simulate some keyboard input */
+ SetFocus(hwnd);
+ keybd_event('Q', 0, 0, 0);
+ hr = IDirectInputDevice_GetDeviceState(pKeyboard, sizeof(custom_state),
custom_state);
+ ok(SUCCEEDED(hr), "IDirectInputDevice_GetDeviceState() failed: %08x\n",
hr);
+ if (!custom_state[0])
+ win_skip("Keyboard event not processed, skipping test\n");
+ else
+ {
+ /* unacquiring should reset the device state */
+ hr = IDirectInputDevice_Unacquire(pKeyboard);
+ ok(SUCCEEDED(hr), "IDirectInputDevice_Unacquire() failed: %08x\n",
hr);
+ hr = IDirectInputDevice_Acquire(pKeyboard);
+ ok(SUCCEEDED(hr), "IDirectInputDevice_Acquire() failed: %08x\n", hr);
+ hr = IDirectInputDevice_GetDeviceState(pKeyboard, sizeof(custom_state),
custom_state);
+ ok(SUCCEEDED(hr), "IDirectInputDevice_GetDeviceState failed: %08x\n",
hr);
+ for (i = 0; i < sizeof(custom_state) / sizeof(custom_state[0]); i++)
+ ok(custom_state[i] == 0, "Should be zeroed, got 0x%08x\n",
custom_state[i]);
+ }
+ keybd_event('Q', 0, KEYEVENTF_KEYUP, 0);
+
if (pKeyboard) IUnknown_Release(pKeyboard);
}