mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-10-25 21:40:06 +00:00
Send LI_CTYPE_STEAM for known Steam Controllers
This commit is contained in:
1 parent
256022d3d6
commit
d2f6990be6
2 files changed
+27
-2
No files matched your search
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user