Commit Graph

18 Commits

Author SHA1 Message Date
Rémi Bernon cd30bf64d6 winexinput.sys: Fix warnings from long integer types.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-28 21:10:21 +01:00
Alexandre Julliard f0cd33c69e include: Add support for defining Win32 types as 'long' where possible.
Add -DWINE_NO_LONG_TYPES to modules that still have compilation
warnings with long types.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-27 20:38:22 +01:00
Rémi Bernon 5802a27dfe winexinput.sys: Use +xinput channel.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-09 11:17:06 +01:00
Alexandre Julliard d5a7d08f63 include: Add a define to enable fastcall wrappers, similar to the thiscall one.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-13 21:57:11 +02:00
Rémi Bernon aa9db743cd winexinput.sys: Remove unnecessary IOCTL_HID_GET_STRING condition.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-06 20:29:34 +02:00
Rémi Bernon 60ef452922 hidclass.sys: Move product string overrides from winexinput.sys.
Some games expect the DS4 gamepads to be named like native drivers, and
they aren't detected xinput-compatible when access through hidraw, so
it's not possible to override their product string in winexinput.sys.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-05 11:48:41 +02:00
Rémi Bernon 4adc0f1e2a winexinput.sys: Add more Xbox One product string overrides.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-05 11:48:32 +02:00
Rémi Bernon 90640da51f winexinput.sys: Fix casing of "Xbox One for Windows" product string.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-05 11:48:30 +02:00
Rémi Bernon ffdcafb9bf winexinput.sys: Override the product string for internal devices.
So DirectInput registry keys can match both the gamepad and the internal
device.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-24 21:55:19 +02:00
Alexandre Julliard 088a787a2c makefiles: Make -mno-cygwin the default.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-20 22:45:48 +02:00
Rémi Bernon 5e41525c3b winexinput.sys: Return native product strings on some devices.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-13 21:12:27 +02:00
Rémi Bernon 2eea1d615a winexinput.sys: Translate lower reports into XInput HID reports.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-10 21:58:28 +02:00
Rémi Bernon b027f70a91 winexinput.sys: Look for caps in the lower HID report descriptor.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-10 21:58:28 +02:00
Rémi Bernon 99614467c1 winexinput.sys: Create an additional internal xinput PDO.
This internal xinput PDO is an HID compatible pass-through device, but
it needs to be kept private and is listed on the internal WINEXINPUT
device interface class, instead of the HID device interface class.

This is a Wine extension for convenience and native XInput driver uses a
different, undocumented, device interface.

We now filter the report read requests to make sure only one is sent
through to the lower bus device, and we complete both gamepad and xinput
read requests at once using the returned data.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-03 21:43:03 +02:00
Rémi Bernon 90175a745c winexinput.sys: Request the bus device report descriptor on startup.
So everything will be ready in the device fdo (or fail to start the
device entirely), when we need it later.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-03 21:43:03 +02:00
Rémi Bernon 1b9bb7f974 winexinput.sys: Handle IRP_MN_QUERY_DEVICE_RELATIONS in pdo_pnp.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-03 21:43:03 +02:00
Rémi Bernon 75adc44191 winexinput.sys: Don't set RawDeviceOk in IRP_MN_QUERY_CAPABILITIES.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-03 21:43:03 +02:00
Rémi Bernon 61e217c40a winexinput.sys: Introduce a new winexinput.sys driver.
Currently only acting as a pass-through driver, matching any device with
a WINEBUS\WINE_COMP_XINPUT compatible id.

This creates new WINEXINPUT\ bus and the gamepad PDO on it, adding the
&IG_ device id suffix to the original device id (replacing an eventual
&MI_ suffix), and removes the need to set it on winebus.sys side.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-02 21:57:38 +02:00