Sweden-Number/dlls/dinput
Arkadiusz Hiler 5cb70e73f0 dinput/tests: Make overlapped format tests more robust.
Both Acquire() and event processing with DirectInput seem to be
asynchronous. In most cases we can just keep hammering GetDeviceData()
until the event gets processed.

Things get pretty racy around Acquire() though. If we fire event right
after the device is acquired we can find ourselves in one of the three
situations:

1. Event happened after acquiring has completed - the wait will suffice.

2. Event happened before acquiring did any real work - the device will
   pick up the state as if the event was processed, but there's nothing
   in GetDeviceData(). Because of that we cannot fail on wait.

3. Event happened somewhere in the middle of acquiring - we ended up
   both missing the event for GetDeviceData() and we have outdated
   state. Sending event again will register as if the button was not
   already pressed.

This change covers all three scenarios.

Signed-off-by: Arkadiusz Hiler <ahiler@codeweavers.com>
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-05 20:43:28 +02:00
..
tests dinput/tests: Make overlapped format tests more robust. 2021-08-05 20:43:28 +02:00
Makefile.in dinput: Move IDirectInputDeviceA wrappers to ansi.c. 2021-05-25 21:13:01 +02:00
ansi.c dinput: Use SUCCEEDED instead of !FAILED. 2021-07-22 13:15:15 +02:00
config.c
data_formats.c
device.c dinput: Don't add 'default value 0' entries to the data transform. 2021-07-08 21:13:54 +02:00
device_private.h dinput: Factor out IDirectInputDevice ansi vtable. 2021-05-28 21:53:07 +02:00
dinput.rc
dinput.spec
dinput_classes.idl
dinput_main.c dinput: Prevent a device interface leak when enumerating. 2021-05-31 11:31:36 +02:00
dinput_private.h dinput: Remove the need for ANSI enum_device callback. 2021-05-31 11:31:28 +02:00
effect_linuxinput.c dinput: Implement IDirectInputDevice_GetEffectInfo WtoA conversion. 2021-05-26 21:29:38 +02:00
joystick.c dinput: Free axis_map when joystick device is freed. 2021-05-31 11:31:42 +02:00
joystick_linux.c dinput: Free axis_map when joystick device is freed. 2021-05-31 11:31:42 +02:00
joystick_linuxinput.c dinput: Free axis_map when joystick device is freed. 2021-05-31 11:31:42 +02:00
joystick_osx.c dinput: Free axis_map when joystick device is freed. 2021-05-31 11:31:42 +02:00
joystick_private.h dinput: Free axis_map when joystick device is freed. 2021-05-31 11:31:42 +02:00
keyboard.c dinput: Remove the need for ANSI enum_device callback. 2021-05-31 11:31:28 +02:00
mouse.c dinput: Remove the need for ANSI enum_device callback. 2021-05-31 11:31:28 +02:00
resource.h
version.rc