From a558409b2e614e2a49aa7204163c349b533277b0 Mon Sep 17 00:00:00 2001 From: Sam Lantinga <slouken@libsdl.org> Date: Tue, 13 Oct 2020 21:08:18 -0700 Subject: [PATCH] Only include CoreHaptics if we're building with rumble support --- src/joystick/iphoneos/SDL_sysjoystick.m | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/joystick/iphoneos/SDL_sysjoystick.m b/src/joystick/iphoneos/SDL_sysjoystick.m index 8094ddad0..920f5ddca 100644 --- a/src/joystick/iphoneos/SDL_sysjoystick.m +++ b/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