From d2f6990be699197385a6458e1231d070da83e665 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Tue, 18 Aug 2026 22:26:07 -0500 Subject: [PATCH] Send LI_CTYPE_STEAM for known Steam Controllers --- app/streaming/input/gamepad.cpp | 27 ++++++++++++++++++++++++++- moonlight-common-c/moonlight-common-c | 2 +- 2 files changed, 27 insertions(+), 2 deletions(-) diff --git a/app/streaming/input/gamepad.cpp b/app/streaming/input/gamepad.cpp index 9b046b33..3ff08527 100644 --- a/app/streaming/input/gamepad.cpp +++ b/app/streaming/input/gamepad.cpp @@ -701,7 +701,32 @@ void SdlInputHandler::handleControllerDeviceEvent(SDL_ControllerDeviceEvent* eve type = LI_CTYPE_NINTENDO; break; default: - type = LI_CTYPE_UNKNOWN; + // These Steam Controller VID/PID combos come from SDL's controller_list.h + // TODO: Use SDL_GAMEPAD_TYPE_STEAM on SDL 3.6+ + if (vendorId == 0x28de) { + switch (productId) { + case 0x1101: + case 0x1102: + case 0x1105: + case 0x1106: + case 0x1142: + case 0x1201: + case 0x1202: + case 0x1205: + case 0x1302: + case 0x1303: + case 0x1304: + case 0x1305: + type = LI_CTYPE_STEAM; + break; + default: + type = LI_CTYPE_UNKNOWN; + break; + } + } + else { + type = LI_CTYPE_UNKNOWN; + } break; } diff --git a/moonlight-common-c/moonlight-common-c b/moonlight-common-c/moonlight-common-c index e41355ea..874ac954 160000 --- a/moonlight-common-c/moonlight-common-c +++ b/moonlight-common-c/moonlight-common-c @@ -1 +1 @@ -Subproject commit e41355ea01670fd4c830b384009d31dd0339a705 +Subproject commit 874ac9548f1bd6f095ef2b435c42cdde460e7821