This adds a new joystick backend, implemented on top of HID and without
any host dependencies. This will be progressively implementated, and
it's not going to be usable until at least a few more patches.
Because of that, and because it may also introduce regressions compared
to the existing backends, it is disabled by default and is optionally
enabled using the following global registry key:
[HKCU\\Software\\Wine\\DirectInput\\Joysticks]
"HID"="enabled"
Or using the corresponding AppDefaults registry key:
[HKCU\\Software\\Wine\\AppDefaults\\<app.exe>\\DirectInput\\Joysticks]
"HID"="enabled"
This setting will be removed later, when it becomes usable enough, to
use the individual device disable mechanism available in joy.cpl.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Virtual key codes are layout dependant while direct input works with
scan codes.
Using virtual key code for 'A' with AZERTY layout resulted in scan code
for 'Q' being sent out, which in turn made the tests fail.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50987
Signed-off-by: Arkadiusz Hiler <ahiler@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This fixes not working analog inputs on game controllers in Slay the Spire.
Signed-off-by: Arkadiusz Hiler <ahiler@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
test_device_input() now takes properly sized appdata expected value and
can be used to send any keyboard event. It also drains device's queue so
it can be called multiple times on a single device instance.
Signed-off-by: Arkadiusz Hiler <ahiler@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Grand Theft Auto IV injects VK_F8 and scancode=0, and expects DirectInput not
to report that F8 is pressed.
Signed-off-by: Brendan Shanks <bshanks@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
To prevent msvcrt linking its own importlib into DLL.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Based on a patch by Andrew Wesie.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45568
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
EnumDevicesBySemantics enums only devices with given username when
DIEDBSFL_THISUSER is set and only unowned devices when
DIEDBSFL_AVAILABLEDEVICES is set.
Signed-off-by: Jetro Jormalainen <jje-wine@jv.jetro.fi>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
EnumDevicesBySemantics should give count of all devices instead of
just keyboard and mouse still to be enumerated when calling callback.
Signed-off-by: Jetro Jormalainen <jje-wine@jv.jetro.fi>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Bruno Jesus <00cpxxx@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>