Update HapticContext.m

This commit is contained in:
Rex Xiong committed 2025-09-27 13:35:19 -07:00
1 parent eeff9b74da
commit 87d9590f3b
1 file changed
+4
+4
View File
@@ -100,6 +100,10 @@
Log(LOG_W, @"Controller %d falls back to use iPhone Haptics for locality: %@", gamepad.playerIndex, locality); Log(LOG_W, @"Controller %d falls back to use iPhone Haptics for locality: %@", gamepad.playerIndex, locality);
NSError *error = nil; NSError *error = nil;
_hapticEngine = [[CHHapticEngine alloc] initAndReturnError:&error]; _hapticEngine = [[CHHapticEngine alloc] initAndReturnError:&error];
if (error != nil) {
Log(LOG_W, @"Controller %d: iPhone Haptic engine failed to start: %@", gamepad.playerIndex, error);
return nil;
}
} }
else { else {
return nil; return nil;