src/joystick/darwin/SDL_sysjoystick.c
changeset 9632 6ae6b0b46e78
parent 9629 9242a9b29c7d
child 9862 c3c3cdaf37f9
equal deleted inserted replaced
9631:e015da7884df 9632:6ae6b0b46e78
   434 
   434 
   435     /* Allocate an instance ID for this device */
   435     /* Allocate an instance ID for this device */
   436     device->instance_id = ++s_joystick_instance_id;
   436     device->instance_id = ++s_joystick_instance_id;
   437 
   437 
   438     /* We have to do some storage of the io_service_t for SDL_HapticOpenFromJoystick */
   438     /* We have to do some storage of the io_service_t for SDL_HapticOpenFromJoystick */
       
   439 
       
   440 #if MAC_OS_X_VERSION_MIN_REQUIRED < 1060
   439     if (IOHIDDeviceGetService != NULL) {  /* weak reference: available in 10.6 and later. */
   441     if (IOHIDDeviceGetService != NULL) {  /* weak reference: available in 10.6 and later. */
       
   442 #endif
       
   443 
   440         const io_service_t ioservice = IOHIDDeviceGetService(ioHIDDeviceObject);
   444         const io_service_t ioservice = IOHIDDeviceGetService(ioHIDDeviceObject);
   441 #if SDL_HAPTIC_IOKIT
   445 #if SDL_HAPTIC_IOKIT
   442         if ((ioservice) && (FFIsForceFeedback(ioservice) == FF_OK)) {
   446         if ((ioservice) && (FFIsForceFeedback(ioservice) == FF_OK)) {
   443             device->ffservice = ioservice;
   447             device->ffservice = ioservice;
   444             MacHaptic_MaybeAddDevice(ioservice);
   448             MacHaptic_MaybeAddDevice(ioservice);
   445         }
   449         }
   446 #endif
   450 #endif
   447     }
   451 
       
   452 #if MAC_OS_X_VERSION_MIN_REQUIRED < 1060
       
   453     }
       
   454 #endif
   448 
   455 
   449     /* Add device to the end of the list */
   456     /* Add device to the end of the list */
   450     if ( !gpDeviceList ) {
   457     if ( !gpDeviceList ) {
   451         gpDeviceList = device;
   458         gpDeviceList = device;
   452     } else {
   459     } else {