소스 검색

Mac: patched to compile with haptic subsystem disabled (thanks, Rodrigo!).

Fixes Bugzilla #2717.
Ryan C. Gordon 11 년 전
부모
커밋
4a071b311b
1개의 변경된 파일과 2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      src/joystick/darwin/SDL_sysjoystick.c

+ 2 - 2
src/joystick/darwin/SDL_sysjoystick.c

@@ -412,12 +412,12 @@ JoystickDeviceWasAddedCallback(void *ctx, IOReturn res, void *sender, IOHIDDevic
     /* We have to do some storage of the io_service_t for SDL_HapticOpenFromJoystick */
     /* 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. */
     if (IOHIDDeviceGetService != NULL) {  /* weak reference: available in 10.6 and later. */
         const io_service_t ioservice = IOHIDDeviceGetService(ioHIDDeviceObject);
         const io_service_t ioservice = IOHIDDeviceGetService(ioHIDDeviceObject);
+#if SDL_HAPTIC_IOKIT
         if ((ioservice) && (FFIsForceFeedback(ioservice) == FF_OK)) {
         if ((ioservice) && (FFIsForceFeedback(ioservice) == FF_OK)) {
             device->ffservice = ioservice;
             device->ffservice = ioservice;
-#if SDL_HAPTIC_IOKIT
             MacHaptic_MaybeAddDevice(ioservice);
             MacHaptic_MaybeAddDevice(ioservice);
-#endif
         }
         }
+#endif
     }
     }
 
 
     device->send_open_event = 1;
     device->send_open_event = 1;