Skip to content

Commit

Permalink
winebuy.sys: Add heuristic for typical Virpil user configurations
Browse files Browse the repository at this point in the history
Some games support a maximum of 32, 50 or 64 buttons specifically, thus
we're seeing HOTAS configurations out there which are adjusted to show
exactly that amount of buttons.

Let's add it as a heuristic for Virpil game controllers.

Link: ValveSoftware/Proton#6839 (comment)
  • Loading branch information
kakra authored and ivyl committed Jun 20, 2024
1 parent 1d87e52 commit 991ad98
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions dlls/winebus.sys/unixlib.c
Original file line number Diff line number Diff line change
Expand Up @@ -127,12 +127,18 @@ static BOOL is_virpil_controller(WORD vid, WORD pid, INT buttons)
switch (vid)
{
case 0x03eb:
/* users may have configured button limits, usually 32/50/64 */
if ((buttons == 32) || (buttons == 50) || (buttons == 64)) return TRUE;

if (pid == 0x2055) return TRUE; /* ATMEL/VIRPIL/200325 VPC Throttle MT-50 CM2 */
break;
case 0x3344:
/* comes with 31 buttons in the default configuration, or 128 max */
if ((buttons == 31) || (buttons == 128)) return TRUE;

/* users may have configured button limits, usually 32/50/64 */
if ((buttons == 32) || (buttons == 50) || (buttons == 64)) return TRUE;

/* if customized, arbitrary amount of buttons may be shown, decide by PID */
if (pid == 0x412f) return TRUE; /* Virpil Constellation ALPHA-R */
if (pid == 0x812c) return TRUE; /* Virpil Constellation ALPHA-L */
Expand Down

0 comments on commit 991ad98

Please sign in to comment.