Mac: Fix compiler warning when building with a min target >= 10.6.
authorRyan C. Gordon <icculus@icculus.org>
Tue, 26 May 2015 12:52:28 -0400
changeset 96326ae6b0b46e78
parent 9631 e015da7884df
child 9633 3e742dd2c13d
Mac: Fix compiler warning when building with a min target >= 10.6.
src/joystick/darwin/SDL_sysjoystick.c
     1.1 --- a/src/joystick/darwin/SDL_sysjoystick.c	Tue May 26 12:47:03 2015 -0400
     1.2 +++ b/src/joystick/darwin/SDL_sysjoystick.c	Tue May 26 12:52:28 2015 -0400
     1.3 @@ -436,7 +436,11 @@
     1.4      device->instance_id = ++s_joystick_instance_id;
     1.5  
     1.6      /* We have to do some storage of the io_service_t for SDL_HapticOpenFromJoystick */
     1.7 +
     1.8 +#if MAC_OS_X_VERSION_MIN_REQUIRED < 1060
     1.9      if (IOHIDDeviceGetService != NULL) {  /* weak reference: available in 10.6 and later. */
    1.10 +#endif
    1.11 +
    1.12          const io_service_t ioservice = IOHIDDeviceGetService(ioHIDDeviceObject);
    1.13  #if SDL_HAPTIC_IOKIT
    1.14          if ((ioservice) && (FFIsForceFeedback(ioservice) == FF_OK)) {
    1.15 @@ -444,7 +448,10 @@
    1.16              MacHaptic_MaybeAddDevice(ioservice);
    1.17          }
    1.18  #endif
    1.19 +
    1.20 +#if MAC_OS_X_VERSION_MIN_REQUIRED < 1060
    1.21      }
    1.22 +#endif
    1.23  
    1.24      /* Add device to the end of the list */
    1.25      if ( !gpDeviceList ) {