Skip to content

Commit d0ce7e8

Browse files
committed
winebus.sys: Enable hidraw for VKB Gladiator NXT EVO.
These devices ship with 128 buttons by default. For game compatibility, the VKB Windows app can be used to change the HID descriptor to show only 32 buttons and have up to 4 virtual devices instead. These devices can also show up as a mouse or keyboard and send proper HID events for that configuration - not tested with this commit. The Linux input layer gets really confused by these devices as the HID descriptor spans multiple ranges of different device type event codes. Hopefully, winebus.sys hidraw mode can work around this. Also needs udev rules to enable hidraw access. Known limits: - Elite Dangerous: 32 buttons - Star Citizen: 50 buttons - some other games: 64 buttons Signed-off-by: Kai Krakow <kai@kaishome.de>
1 parent 7fceaf7 commit d0ce7e8

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

dlls/winebus.sys/unixlib.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,19 @@ static BOOL is_fanatec_pedals(WORD vid, WORD pid)
105105
return FALSE;
106106
}
107107

108+
static BOOL is_vkb_controller(WORD vid, WORD pid, INT buttons)
109+
{
110+
if (vid != 0x231D) return FALSE;
111+
112+
/* comes with 128 buttons in the default configuration */
113+
if (buttons == 128) return TRUE;
114+
115+
/* if customized, less than 128 buttons may be shown, decide by PID */
116+
if (pid == 0x0200) return TRUE; /* VKBsim Gladiator EVO Right Grip */
117+
if (pid == 0x0201) return TRUE; /* VKBsim Gladiator EVO Left Grip */
118+
return FALSE;
119+
}
120+
108121
BOOL is_hidraw_enabled(WORD vid, WORD pid, INT axes, INT buttons)
109122
{
110123
const char *enabled = getenv("PROTON_ENABLE_HIDRAW");
@@ -115,6 +128,7 @@ BOOL is_hidraw_enabled(WORD vid, WORD pid, INT axes, INT buttons)
115128
if (is_thrustmaster_hotas(vid, pid)) return TRUE;
116129
if (is_simucube_wheel(vid, pid)) return TRUE;
117130
if (is_fanatec_pedals(vid, pid)) return TRUE;
131+
if (is_vkb_controller(vid, pid, buttons)) return TRUE;
118132

119133
sprintf(needle, "0x%04x/0x%04x", vid, pid);
120134
if (enabled) return strcasestr(enabled, needle) != NULL;

0 commit comments

Comments
 (0)