mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-06 06:34:35 +00:00
Fixed crash on Windows when a controller is connected
(cherry picked from commit 4a52a5ee04)
This commit is contained in:
parent
2dbfe0ead9
commit
1d75b6bc59
1 changed files with 1 additions and 1 deletions
|
|
@ -376,7 +376,7 @@ static bool HIDAPI_DriverXboxOne_IsSupportedDevice(SDL_HIDAPI_Device *device, co
|
|||
}
|
||||
#endif
|
||||
#ifdef SDL_PLATFORM_WIN32
|
||||
if (SDL_strncmp(device->path, "\\\\?\\HID#", 8) == 0) {
|
||||
if (device && SDL_strncmp(device->path, "\\\\?\\HID#", 8) == 0) {
|
||||
// Windows provides a fake HID endpoint for XGIP controllers, don't use this
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue