SDL: Improved Steam Controller detection on iOS

From 748f0b3201bee16f9794729a0ed56406848f4aa6 Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Mon, 6 Jan 2025 17:16:23 -0800
Subject: [PATCH] Improved Steam Controller detection on iOS

---
 src/hidapi/ios/hid.m | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/hidapi/ios/hid.m b/src/hidapi/ios/hid.m
index d0a8b54d240ac..b6f8037304cb7 100644
--- a/src/hidapi/ios/hid.m
+++ b/src/hidapi/ios/hid.m
@@ -335,7 +335,7 @@ - (int)updateConnectedSteamControllers:(BOOL) bForce
 			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 @@ - (void)centralManager:(CBCentralManager *)central didDiscoverPeripheral:(CBPeri
 	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;