Mac: patched to compile with haptic subsystem disabled (thanks, Rodrigo!).
authorRyan C. Gordon <icculus@icculus.org>
Tue, 24 Mar 2015 03:24:57 -0400
changeset 9432 5e8151f59e34
parent 9431 a9c73f29a15e
child 9433 bd062398b648
Mac: patched to compile with haptic subsystem disabled (thanks, Rodrigo!). Fixes Bugzilla #2717.
src/joystick/darwin/SDL_sysjoystick.c
--- a/src/joystick/darwin/SDL_sysjoystick.c	Tue Mar 24 03:21:57 2015 -0400
+++ b/src/joystick/darwin/SDL_sysjoystick.c	Tue Mar 24 03:24:57 2015 -0400
@@ -412,12 +412,12 @@
     /* We have to do some storage of the io_service_t for SDL_HapticOpenFromJoystick */
     if (IOHIDDeviceGetService != NULL) {  /* weak reference: available in 10.6 and later. */
         const io_service_t ioservice = IOHIDDeviceGetService(ioHIDDeviceObject);
+#if SDL_HAPTIC_IOKIT
         if ((ioservice) && (FFIsForceFeedback(ioservice) == FF_OK)) {
             device->ffservice = ioservice;
-#if SDL_HAPTIC_IOKIT
             MacHaptic_MaybeAddDevice(ioservice);
+        }
 #endif
-        }
     }
 
     device->send_open_event = 1;