Instead of going through devices list of dinputs list, and checking
their acquired field, which is not CPU friendly.
This also removes the now unused IDirectInputImpl critical section and
devices list.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Tablet/Stylus devices have a js* entry which we are
treating as a joystick. Any testbox VM that is configured
with a tablet is currently failing the joystick tests.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Windows uses an undocumented GUID (ending in ASCII "PIDVID") for
non-keyboard/mouse devices. Various games (DiRT Rally 2) and libraries
(SDL, GLFW) look for this GUID to match specific devices or know that
the PID/VID can be extracted.
Signed-off-by: Brendan Shanks <bshanks@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Some Ubisoft titles use the property to check if a dinput gamepad is
also an xinput device.
Signed-off-by: Alexey Prokhin <alexey@prokhin.ru>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Star Wars: Rogue 3D requests a DirectX 3.0 version
0108:trace:dinput:DirectInputCreateEx (0x400000,0300,{9a4cb684-236d-11d3-8e9d-00c04f6844ae},0x7acfa0,(nil))
and then tries to interate over all Joysticks.
When using modern windows, the current tests show that this is the correct behaviour.
However, it's possible to use a shim to allow older games, like the
one above, to interate over joysticks.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
The axes wheel, gas, and brake are just differently named replacements
for X, Y, and Z when using wheel-like joysticks.
Make those accessible by remapping them to X, Y, and Z internally.
Signed-off-by: Tim Schumacher <timschumi@gmx.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This matches what Windows does with common controllers like xbox 360.
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
The wiimote is a well known problematic device, mainly because it is not
a joystick. It is a USB device. But the classic controller is at least
advertised as a joystick with 6 axes and 11 buttons (js driver only, NO
event).
Signed-off-by: Bruno Jesus <bjesus@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Even the Xbox 360 controller which does not use HID has the same flags
and usage page set on Windows.
Signed-off-by: Bruno Jesus <00cpxxx@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>