mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-16 23:06:03 +00:00
Ignore Steam Controllers in the Linux driver if HIDAPI is handling them
This commit is contained in:
@@ -216,6 +216,11 @@ static bool IsVirtualJoystick(Uint16 vendor, Uint16 product, Uint16 version, con
|
|||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
static bool IsVirtualJoystick(Uint16 vendor, Uint16 product, Uint16 version, const char *name)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
#endif // SDL_JOYSTICK_HIDAPI
|
#endif // SDL_JOYSTICK_HIDAPI
|
||||||
|
|
||||||
static bool GetSteamVirtualGamepadSlot(int fd, int *slot)
|
static bool GetSteamVirtualGamepadSlot(int fd, int *slot)
|
||||||
@@ -661,9 +666,13 @@ static void HandlePendingRemovals(void)
|
|||||||
|
|
||||||
static bool SteamControllerConnectedCallback(const char *name, SDL_GUID guid, SDL_JoystickID *device_instance)
|
static bool SteamControllerConnectedCallback(const char *name, SDL_GUID guid, SDL_JoystickID *device_instance)
|
||||||
{
|
{
|
||||||
SDL_joylist_item *item;
|
Uint16 vendor, product, version;
|
||||||
|
SDL_GetJoystickGUIDInfo(guid, &vendor, &product, &version, NULL);
|
||||||
|
if (SDL_JoystickHandledByAnotherDriver(&SDL_LINUX_JoystickDriver, vendor, product, version, name)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
item = (SDL_joylist_item *)SDL_calloc(1, sizeof(SDL_joylist_item));
|
SDL_joylist_item *item = (SDL_joylist_item *)SDL_calloc(1, sizeof(SDL_joylist_item));
|
||||||
if (!item) {
|
if (!item) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user