Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

winebus.sys: Enable hidraw for Simucube racing wheels and Fanatec pedals. #163

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion dlls/winebus.sys/bus_udev.c
Original file line number Diff line number Diff line change
Expand Up @@ -1695,7 +1695,8 @@ 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) && !is_thrustmaster_hotas(desc.vid, desc.pid))
if (!is_dualshock4_gamepad(desc.vid, desc.pid) && !is_dualsense_gamepad(desc.vid, desc.pid) && !is_thrustmaster_hotas(desc.vid, desc.pid) &&
!is_simucube_wheel(desc.vid, desc.pid) && !is_fanatec_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
2 changes: 2 additions & 0 deletions dlls/winebus.sys/unix_private.h
Original file line number Diff line number Diff line change
Expand Up @@ -286,5 +286,7 @@ 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_hotas(WORD vid, WORD pid) DECLSPEC_HIDDEN;
BOOL is_simucube_wheel(WORD vid, WORD pid) DECLSPEC_HIDDEN;
BOOL is_fanatec_pedals(WORD vid, WORD pid) DECLSPEC_HIDDEN;

#endif /* __WINEBUS_UNIX_PRIVATE_H */
18 changes: 18 additions & 0 deletions dlls/winebus.sys/unixlib.c
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,24 @@ BOOL is_thrustmaster_hotas(WORD vid, WORD pid)
return vid == 0x044F && (pid == 0xB679 || pid == 0xB687 || pid == 0xB10A);
}

BOOL is_simucube_wheel(WORD vid, WORD pid)
{
if (vid != 0x16D0) return FALSE;
if (pid == 0x0D61) return TRUE; /* Simucube 2 Sport */
if (pid == 0x0D60) return TRUE; /* Simucube 2 Pro */
if (pid == 0x0D5F) return TRUE; /* Simucube 2 Ultimate */
if (pid == 0x0D5A) return TRUE; /* Simucube 1 */
return FALSE;
}

BOOL is_fanatec_pedals(WORD vid, WORD pid)
{
if (vid != 0x0EB7) return FALSE;
if (pid == 0x183B) return TRUE; /* Fanatec ClubSport Pedals v3 */
if (pid == 0x1839) return TRUE; /* Fanatec ClubSport Pedals v1/v2 */
return FALSE;
}

struct mouse_device
{
struct unix_device unix_device;
Expand Down