mirror of
https://github.com/encounter/SDL.git
synced 2025-12-14 07:36:09 +00:00
Fixed build
This commit is contained in:
@@ -141,7 +141,7 @@ static Uint32 crc32(Uint32 crc, const void *data, int count)
|
||||
static SDL_bool
|
||||
HIDAPI_DriverPS4_IsSupportedDevice(Uint16 vendor_id, Uint16 product_id, Uint16 version, int interface_number, const char *name)
|
||||
{
|
||||
return (SDL_GetGameControllerType(vendor_id, product_id) == SDL_CONTROLLER_TYPE_PS4);
|
||||
return (SDL_GetJoystickGameControllerType(vendor_id, product_id, name) == SDL_CONTROLLER_TYPE_PS4);
|
||||
}
|
||||
|
||||
static const char *
|
||||
|
||||
@@ -226,16 +226,7 @@ typedef struct {
|
||||
static SDL_bool
|
||||
HIDAPI_DriverSwitch_IsSupportedDevice(Uint16 vendor_id, Uint16 product_id, Uint16 version, int interface_number, const char *name)
|
||||
{
|
||||
if (vendor_id == 0 && product_id == 0) {
|
||||
/* Some devices are only identifiable by their name */
|
||||
if (SDL_strcmp(name, "Lic Pro Controller") == 0 ||
|
||||
SDL_strcmp(name, "Nintendo Wireless Gamepad") == 0 ||
|
||||
SDL_strcmp(name, "Wireless Gamepad") == 0) {
|
||||
/* HORI or PowerA Switch Pro Controller clone */
|
||||
return SDL_TRUE;
|
||||
}
|
||||
}
|
||||
return SDL_IsJoystickNintendoSwitchPro(vendor_id, product_id);
|
||||
return (SDL_GetJoystickGameControllerType(vendor_id, product_id, name) == SDL_CONTROLLER_TYPE_NINTENDO_SWITCH_PRO);
|
||||
}
|
||||
|
||||
static const char *
|
||||
|
||||
@@ -249,7 +249,7 @@ HIDAPI_DriverXbox360_QuitWindowsGamingInput(SDL_DriverXbox360_Context *ctx)
|
||||
static SDL_bool
|
||||
HIDAPI_DriverXbox360_IsSupportedDevice(Uint16 vendor_id, Uint16 product_id, Uint16 version, int interface_number, const char *name)
|
||||
{
|
||||
SDL_GameControllerType type = SDL_GameControllerType(vendor_id, product_id);
|
||||
SDL_GameControllerType type = SDL_GetJoystickGameControllerType(vendor_id, product_id, name);
|
||||
|
||||
#if defined(__MACOSX__) || defined(__WIN32__)
|
||||
if (vendor_id == 0x045e && product_id == 0x028e && version == 1) {
|
||||
|
||||
@@ -197,7 +197,7 @@ HIDAPI_DriverXboxOne_IsSupportedDevice(Uint16 vendor_id, Uint16 product_id, Uint
|
||||
return SDL_FALSE;
|
||||
}
|
||||
#endif
|
||||
return (SDL_GetGameControllerType(vendor_id, product_id) == SDL_CONTROLLER_TYPE_XBOXONE);
|
||||
return (SDL_GetJoystickGameControllerType(vendor_id, product_id, name) == SDL_CONTROLLER_TYPE_XBOXONE);
|
||||
}
|
||||
|
||||
static const char *
|
||||
|
||||
Reference in New Issue
Block a user