Browse Source

Only include CoreHaptics if we're building with rumble support

Sam Lantinga 4 years ago
parent
commit
a558409b2e
1 changed files with 4 additions and 1 deletions
  1. 4 1
      src/joystick/iphoneos/SDL_sysjoystick.m

+ 4 - 1
src/joystick/iphoneos/SDL_sysjoystick.m

@@ -42,7 +42,6 @@
 #if !TARGET_OS_TV
 #import <CoreMotion/CoreMotion.h>
 #endif
-#import <CoreHaptics/CoreHaptics.h>
 
 #ifdef SDL_JOYSTICK_MFI
 #import <GameController/GameController.h>
@@ -80,6 +79,10 @@ static id disconnectObserver = nil;
 #define ENABLE_MFI_RUMBLE
 #endif
 
+#ifdef ENABLE_MFI_RUMBLE
+#import <CoreHaptics/CoreHaptics.h>
+#endif
+
 #endif /* SDL_JOYSTICK_MFI */
 
 #if !TARGET_OS_TV