From c8ebb1456e5c1d62f4da69362b263d734b6334bd Mon Sep 17 00:00:00 2001 From: "atirado.net" <129443089+atiradonet@users.noreply.github.com> Date: Tue, 21 Apr 2026 19:00:14 +1000 Subject: [PATCH] Backport VIRPIL Controls device IDs to SDL2 Backport of SDL3 fix (libsdl-org/SDL#15418). VIRPIL Controls (VID 0x3344) flight sticks are misclassified as gamepads by SDL's axis-count heuristic because they report exactly 6 axes, matching SDL_GAMEPAD_AXIS_COUNT. Adding them to the appropriate device lists ensures correct classification. Tested on Linux (Fedora 43, kernel 6.19) with: - R-VPC Stick MT-50CM3 (PID 0x4391) - L-VPC Stick MT-50CM3 (PID 0x8390) - VPC VMAX Prime Throttle (PID 0x0196) --- src/joystick/SDL_joystick.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/joystick/SDL_joystick.c b/src/joystick/SDL_joystick.c index 60b0daf790..84cc0621bc 100644 --- a/src/joystick/SDL_joystick.c +++ b/src/joystick/SDL_joystick.c @@ -293,6 +293,8 @@ static Uint32 initial_flightstick_devices[] = { MAKE_VIDPID(0x046d, 0xc215), /* Logitech Extreme 3D */ MAKE_VIDPID(0x231d, 0x0126), /* Gunfighter Mk.III ‘Space Combat Edition’ (right) */ MAKE_VIDPID(0x231d, 0x0127), /* Gunfighter Mk.III ‘Space Combat Edition’ (left) */ + MAKE_VIDPID(0x3344, 0x4391), /* VIRPIL Controls R-VPC Stick MT-50CM3 */ + MAKE_VIDPID(0x3344, 0x8390), /* VIRPIL Controls L-VPC Stick MT-50CM3 */ MAKE_VIDPID(0x362c, 0x0001), /* Yawman Arrow */ }; static SDL_vidpid_list flightstick_devices = { @@ -332,6 +334,7 @@ static SDL_vidpid_list rog_gamepad_mice = { static Uint32 initial_throttle_devices[] = { MAKE_VIDPID(0x044f, 0x0404), /* HOTAS Warthog Throttle */ MAKE_VIDPID(0x0738, 0xa221), /* Saitek Pro Flight X-56 Rhino Throttle */ + MAKE_VIDPID(0x3344, 0x0196), /* VIRPIL Controls VPC VMAX Prime Throttle */ }; static SDL_vidpid_list throttle_devices = { SDL_HINT_JOYSTICK_THROTTLE_DEVICES, 0, 0, NULL,