Skip to content

Commit d324c52

Browse files
committed
winebus.sys: Enable hidraw for Virpil Constellation ALPHA-R.
Fixes: ValveSoftware/Proton#6839
1 parent d0ce7e8 commit d324c52

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

dlls/winebus.sys/unixlib.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,18 @@ static BOOL is_vkb_controller(WORD vid, WORD pid, INT buttons)
118118
return FALSE;
119119
}
120120

121+
static BOOL is_virpil_controller(WORD vid, WORD pid, INT buttons)
122+
{
123+
if (vid != 0x3344) return FALSE;
124+
125+
/* comes with 31 buttons in the default configuration, or 128 max */
126+
if ((buttons == 31) || (buttons == 128)) return TRUE;
127+
128+
/* if customized, arbitrary amount of buttons may be shown, decide by PID */
129+
if (pid == 0x412f) return TRUE; /* Virpil Constellation ALPHA-R */
130+
return FALSE;
131+
}
132+
121133
BOOL is_hidraw_enabled(WORD vid, WORD pid, INT axes, INT buttons)
122134
{
123135
const char *enabled = getenv("PROTON_ENABLE_HIDRAW");
@@ -129,6 +141,7 @@ BOOL is_hidraw_enabled(WORD vid, WORD pid, INT axes, INT buttons)
129141
if (is_simucube_wheel(vid, pid)) return TRUE;
130142
if (is_fanatec_pedals(vid, pid)) return TRUE;
131143
if (is_vkb_controller(vid, pid, buttons)) return TRUE;
144+
if (is_virpil_controller(vid, pid, buttons)) return TRUE;
132145

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

0 commit comments

Comments
 (0)