mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-04 19:55:19 +00:00
Fixed detecting the Steam virtual gamepad when HIDAPI is disabled
This commit is contained in:
parent
ed6e03436e
commit
ec0066aa0b
1 changed files with 5 additions and 0 deletions
|
|
@ -1772,6 +1772,11 @@ bool IOS_SupportedHIDDevice(IOHIDDeviceRef device)
|
|||
return false;
|
||||
}
|
||||
|
||||
if (IOHIDDeviceGetProperty(device, CFSTR(kIOHIDVirtualHIDevice)) == kCFBooleanTrue) {
|
||||
// Steam virtual gamepads always have kIOHIDVirtualHIDevice property unlike real devices, and are also not exposed as GCController
|
||||
return false;
|
||||
}
|
||||
|
||||
if (@available(macOS 11.0, *)) {
|
||||
const int MAX_ATTEMPTS = 3;
|
||||
for (int attempt = 0; attempt < MAX_ATTEMPTS; ++attempt) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue