Skip to content

Commit

Permalink
winebus.sys: Enable hidraw for Thrustmaster T.Flight Rudder Pedals
Browse files Browse the repository at this point in the history
  • Loading branch information
ivyl committed Apr 20, 2022
1 parent 957da97 commit df982e6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion dlls/winebus.sys/bus_udev.c
Original file line number Diff line number Diff line change
Expand Up @@ -1695,7 +1695,7 @@ static void udev_add_device(struct udev_device *dev, int fd)
memcpy(desc.serialnumber, zeros, sizeof(zeros));
}

if (!is_dualshock4_gamepad(desc.vid, desc.pid) && !is_dualsense_gamepad(desc.vid, desc.pid))
if (!is_dualshock4_gamepad(desc.vid, desc.pid) && !is_dualsense_gamepad(desc.vid, desc.pid) && !is_thrustmaster_rudder_pedals(desc.vid, desc.pid))
{
TRACE("hidraw %s: deferring %s to a different backend\n", debugstr_a(devnode), debugstr_device_desc(&desc));
close(fd);
Expand Down
1 change: 1 addition & 0 deletions dlls/winebus.sys/unix_private.h
Original file line number Diff line number Diff line change
Expand Up @@ -284,5 +284,6 @@ BOOL is_xbox_gamepad(WORD vid, WORD pid) DECLSPEC_HIDDEN;
BOOL is_dualshock4_gamepad(WORD vid, WORD pid) DECLSPEC_HIDDEN;
BOOL is_dualsense_gamepad(WORD vid, WORD pid) DECLSPEC_HIDDEN;
BOOL is_logitech_g920(WORD vid, WORD pid) DECLSPEC_HIDDEN;
BOOL is_thrustmaster_rudder_pedals(WORD vid, WORD pid) DECLSPEC_HIDDEN;

#endif /* __WINEBUS_UNIX_PRIVATE_H */
5 changes: 5 additions & 0 deletions dlls/winebus.sys/unixlib.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,11 @@ BOOL is_logitech_g920(WORD vid, WORD pid)
return vid == 0x046D && pid == 0xC262;
}

BOOL is_thrustmaster_rudder_pedals(WORD vid, WORD pid)
{
return vid == 0x044F && pid == 0xB679;
}

struct mouse_device
{
struct unix_device unix_device;
Expand Down

0 comments on commit df982e6

Please sign in to comment.