Skip to content

Instantly share code, notes, and snippets.

@ananace
Created October 23, 2021 12:24
Show Gist options
  • Save ananace/1369773f649732da6a415a30c3db79ac to your computer and use it in GitHub Desktop.
Save ananace/1369773f649732da6a415a30c3db79ac to your computer and use it in GitHub Desktop.
Simpler joyaxis patch for Wine 6.20
diff --git a/dlls/winejoystick.drv/joystick_linux.c b/dlls/winejoystick.drv/joystick_linux.c
index 8d1a7b1a25a..4057ec52a1e 100644
--- a/dlls/winejoystick.drv/joystick_linux.c
+++ b/dlls/winejoystick.drv/joystick_linux.c
@@ -260,9 +260,9 @@ LRESULT driver_joyGetDevCaps(DWORD_PTR dwDevID, LPJOYCAPSW lpCaps, DWORD dwSize)
lpCaps->wUmax = 0xFFFF;
lpCaps->wVmin = 0;
lpCaps->wVmax = 0xFFFF;
- lpCaps->wMaxAxes = 6; /* same as MS Joystick Driver */
+ lpCaps->wMaxAxes = 16; /* same as MS Joystick Driver */
lpCaps->wNumAxes = 0; /* nr of axes in use */
- lpCaps->wMaxButtons = 32; /* same as MS Joystick Driver */
+ lpCaps->wMaxButtons = 64; /* same as MS Joystick Driver */
lpCaps->szRegKey[0] = 0;
lpCaps->szOEMVxD[0] = 0;
lpCaps->wCaps = 0;
@@ -272,6 +272,7 @@ LRESULT driver_joyGetDevCaps(DWORD_PTR dwDevID, LPJOYCAPSW lpCaps, DWORD dwSize)
case 1: /* Y */
case 8: /* Wheel */
case 9: /* Gas */
+ case 40: /* Mouse-like */
lpCaps->wNumAxes++;
break;
case 2: /* Z */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment