Rémi Bernon
4e04446c9b
windows.gaming.input: Implement Windows.Gaming.Input.ConditionForceEffect runtimeclass.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-05-17 20:46:52 +02:00
Rémi Bernon
8d45305400
windows.gaming.input: Implement Windows.Gaming.Input.PeriodicForceEffect runtimeclass.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-05-17 20:46:51 +02:00
Rémi Bernon
569036b1f0
windows.gaming.input: Implement Windows.Gaming.Input.RampForceEffect runtimeclass.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-05-17 20:46:49 +02:00
Rémi Bernon
ea71b9f81b
dinput/tests: Add some Windows.Gaming.Input.ForceFeedback.ConditionForceEffect tests.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-05-17 20:46:48 +02:00
Rémi Bernon
e9f430d955
dinput/tests: Add some Windows.Gaming.Input.ForceFeedback.RampForceEffect tests.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-05-17 20:46:48 +02:00
Rémi Bernon
b5b71d9aed
dinput/tests: Add some Windows.Gaming.Input.ForceFeedback.PeriodicForceEffect tests.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-05-17 20:46:48 +02:00
Zebediah Figura
21379f3ddf
dinput: Pass the device instance directly to hid_joystick_device_(try_)open.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-05-17 11:49:58 +02:00
Zebediah Figura
cd33f7154d
dinput: Pass a single GUID pointer to hid_joystick_device_open().
...
We set the instance and product IDs for all joysticks to match the latter parts
of hid_joystick_guid and dinput_pidvid_guid, respectively. Therefore there is no
need to manually check which one we are matching against.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-05-17 11:49:53 +02:00
Zebediah Figura
bb791a7dd0
dinput: Allocate the dinput_device structure in the caller to dinput_device_alloc().
...
Rename it to dinput_device_init() accordingly.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-05-16 22:10:15 +02:00
Rémi Bernon
c6011504a4
dinput: Rename This to device in dinput_device_alloc.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-05-16 22:10:15 +02:00
Rémi Bernon
10b00e66bc
dinput: Return an HRESULT from hid_joystick_device_try_open.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-05-16 22:10:15 +02:00
Zebediah Figura
ac7fa1677a
dinput: Return E_OUTOFMEMORY on allocation failure in hid_joystick_create_device().
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-05-16 22:10:15 +02:00
Zebediah Figura
dd5f3b6fc1
dinput: Rename dinput_device_init() to dinput_device_init_device_format().
...
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-05-16 22:10:15 +02:00
Zebediah Figura
cc5178fe73
dinput: Factor out the dinput_device_init() call into dinput7_CreateDeviceEx().
...
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-05-16 22:10:15 +02:00
Rémi Bernon
39f903481c
dinput: Store the user_format field inline in struct dinput_device.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-05-16 22:10:15 +02:00
Zebediah Figura
34bb223715
dinput: Store the device_format field inline in struct dinput_device.
...
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-05-16 22:10:15 +02:00
Rémi Bernon
7259346ab0
windows.gaming.input: Implement IForceFeedbackMotor_LoadEffectAsync.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-05-16 11:21:42 +02:00
Rémi Bernon
d5edf656ef
windows.gaming.input: Implement IForceFeedbackEffect interface for ConstantForceEffect.
...
Using COM aggregation and a new IWineForceFeedbackEffectImpl interface,
deriving from IUnknown as it is only used internally.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-05-16 11:21:39 +02:00
Rémi Bernon
aa37aad2c8
windows.gaming.input: Implement and instantiate ConstantForceEffect runtimeclass stubs.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-05-16 11:21:38 +02:00
Rémi Bernon
5097e67f55
dinput/tests: Increase async bool handler wait timeout.
...
We waited on the driver-side buffers to be sent, but sometimes the
async completion needs a bit more time to complete itself.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-05-16 11:21:36 +02:00
Rémi Bernon
b1306875ff
windows.gaming.input: Implement stub ConstantForceEffect runtimeclass factory.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-05-11 11:40:43 +02:00
Rémi Bernon
606dc246ff
dinput/tests: Wait for the expected report to actually be pending.
...
There is a race otherwise where we try to complete a pending IRP but
because the async is writing the report from another thread we didn't
find it and instead ignored it.
Instead we need to atomically check if there was a pending IRP, and if
the queue is empty, or queue the wait.
Later, when a report is going to be marked as pending, and if there's
someone waiting for it already, we instead complete it immediately.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-05-11 11:40:35 +02:00
Rémi Bernon
78ecbc4b2d
dinput: Do not delete static critical section.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-05-06 21:36:38 +02:00
Rémi Bernon
2921714f3c
dinput/tests: Add some Windows.Gaming.Input.ForceFeedback.ConstantForceEffect tests.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-05-03 19:03:07 +02:00
Rémi Bernon
3f290740c0
dinput/tests: Remove output and feature report buffers length checks.
...
They are checked against the expected packet anyway, and they otherwise
are enforced to match their specific individual report length, which we
don't have any info about here.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-05-03 19:03:05 +02:00
Rémi Bernon
92f05bd3e7
dinput/tests: Move Windows.Gaming.Input.RacingWheel tests to joystick8.c.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-05-03 19:03:05 +02:00
Rémi Bernon
4ee3edf98c
dinput/tests: Enforce HID report descriptor buffer size.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-05-03 19:03:05 +02:00
Rémi Bernon
b8a54fb1b8
dinput/tests: Increase delayed TryResetAsync test wait timeout.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-05-03 19:03:05 +02:00
Rémi Bernon
846e94f03d
dinput/tests: Remove racy controller removed handler check.
...
It now consistently fails on w1064_tsign, and it's called concurrently
with the handler invocation.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-05-03 19:03:03 +02:00
Zebediah Figura
887f6891e7
dinput/tests: Set the callback event after setting "impl->invoked".
...
Fixes an intermittent test failure.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-05-03 19:03:01 +02:00
Zebediah Figura
982a5b9f91
dinput/tests: Do not test that reports are identical when polling.
...
This is dependent on timing, and currently fails occasionally both on Windows
and Wine.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-05-03 19:02:58 +02:00
Rémi Bernon
730b35ba46
windows.gaming.input: Import IAsyncOperation from windows.media.speech.
...
Adapting it for the IAsyncOperation_boolean interface and use it to
implement IForceFeedbackMotor_Try(Enable|Disable|Reset)Async.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-26 22:21:04 +02:00
Rémi Bernon
78261e08bf
windows.gaming.input: Implement IForceFeedbackMotor_(Pause|Resume|StopAll)Effects.
...
And IForceFeedbackMotor_get_AreEffectsPaused.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-25 20:34:14 +02:00
Rémi Bernon
fec8aae236
windows.gaming.input: Implement IForceFeedbackMotor_(get|put)_MasterGain.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-25 20:34:11 +02:00
Rémi Bernon
cd24005266
windows.gaming.input: Acquire the device exclusively when creating ForceFeedbackMotor.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-25 20:34:07 +02:00
Rémi Bernon
69745cc12d
windows.gaming.input: Implement ForceFeedbackMotor stub runtimeclass.
...
And create it for RawGameController and RacingWheel motors.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-25 20:34:04 +02:00
Rémi Bernon
5c88fea5e7
windows.gaming.input: Return an empty vector from RawGameController_get_ForceFeedbackMotors.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-25 20:34:00 +02:00
Rémi Bernon
b01760e734
dinput/tests: Remove unreliable IAsyncOperation_boolean checks.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-25 20:33:54 +02:00
Rémi Bernon
ea30b88a99
dinput/tests: Add some RacingWheel runtimeclass tests.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-22 13:20:13 +02:00
Rémi Bernon
d141e35456
dinput/tests: Add more IForceFeedbackMotor and IAsyncOperation_boolean tests.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-21 21:19:40 +02:00
Rémi Bernon
c6966b5294
dinput/tests: Queue IRP when the expect ret_status is STATUS_PENDING.
...
And complete it on the next IOCTL_WINETEST_HID_WAIT_EXPECT ioctl.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-21 21:19:35 +02:00
Rémi Bernon
19f0f3cb65
dinput/tests: Add some IRawGameController_get_ForceFeedbackMotors tests.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-21 21:19:31 +02:00
Rémi Bernon
43eb6707bc
dinput/tests: Add tests for joystick with many axes and units.
...
Checking that only a few axes get really mapped to the slider axes, and
that we shouldn't use HID_USAGE_SIMULATION_RUDDER if there's already an
Rz mapped axis.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-21 21:19:29 +02:00
Rémi Bernon
70609b4d6c
dinput/tests: Add some HidD_GetPhysicalDescriptor tests.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-30 21:56:43 +02:00
Rémi Bernon
d9fdde935a
dinput/tests: Keep child PDO remove IRP pending until fully removed.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-24 23:22:06 +01:00
Rémi Bernon
9955ce8fd2
dinput/tests: Wait for spurious Win7 polled HID device events.
...
Win7 has spurious device arrival / removal messages for the first polled
HID device created, probably when installing the driver the first time,
and it causes a timeout if we open it before it completed its sequence.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-24 23:22:06 +01:00
Rémi Bernon
dcfd15ff93
dinput/tests: Remove now unused HID test driver.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-22 18:51:06 +01:00
Rémi Bernon
2644f63617
dinput/tests: Create all HID devices from the Bus driver.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-22 18:51:06 +01:00
Rémi Bernon
2a52c8dcd2
dinput/tests: Create a HID device from the Bus device.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-22 18:51:02 +01:00
Rémi Bernon
709e31fffc
dinput/tests: Create a child PDO from the Bus driver.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-22 18:41:50 +01:00