Improved Steam Controller detection on iOS

This commit is contained in:
Sam Lantinga committed 2025-01-06 17:16:23 -08:00
1 parent ba1a980535
commit 748f0b3201
1 file changed
+2 -2
+2 -2
View File
@@ -335,7 +335,7 @@ typedef enum
continue;
NSLog( @"connected peripheral: %@", peripheral );
if ( [peripheral.name isEqualToString:@"SteamController"] )
if ( [peripheral.name hasPrefix:@"Steam"] )
{
self.nPendingPairs += 1;
HIDBLEDevice *steamController = [[HIDBLEDevice alloc] initWithPeripheral:peripheral];
@@ -459,7 +459,7 @@ typedef enum
NSString *localName = [advertisementData objectForKey:CBAdvertisementDataLocalNameKey];
NSString *log = [NSString stringWithFormat:@"Found '%@'", localName];
if ( [localName isEqualToString:@"SteamController"] )
if ( [localName hasPrefix:@"Steam"] )
{
NSLog( @"%@ : %@ - %@", log, peripheral, advertisementData );
self.nPendingPairs += 1;