mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-20 02:08:13 +00:00
Add Steam Virtual Gamepad and Xbox 360 Wired Controller defines instead of magic values
See https://partner.steamgames.com/doc/features/steam_controller/steam_input_gamepad_emulation_bestpractices for details on what is Steam Virtual Gamepad.
This commit is contained in:

committed by
Sam Lantinga

parent
0c4ac33a09
commit
39302c9214
@@ -245,7 +245,7 @@ SDL_IsXInputDevice(Uint16 vendor_id, Uint16 product_id, const char* hidPath)
|
||||
type = SDL_GetJoystickGameControllerType("", vendor_id, product_id, -1, 0, 0, 0);
|
||||
if (type == SDL_CONTROLLER_TYPE_XBOX360 ||
|
||||
type == SDL_CONTROLLER_TYPE_XBOXONE ||
|
||||
(vendor_id == 0x28DE && product_id == 0x11FF)) {
|
||||
(vendor_id == USB_VENDOR_VALVE && product_id == USB_PRODUCT_STEAM_VIRTUAL_GAMEPAD)) {
|
||||
return SDL_TRUE;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user