Removed Mac OS 10.5 support (bug #3137). Also fixed a warning about deprecated Carbon code when using SDL_audio (bug #3127, thanks Dominik!)

This commit is contained in:
Alex Szpakowski 2016-05-21 00:20:52 -03:00
parent 174644080b
commit e2f5a3023a
14 changed files with 83 additions and 280 deletions

View file

@ -422,6 +422,7 @@ JoystickDeviceWasAddedCallback(void *ctx, IOReturn res, void *sender, IOHIDDevic
{
recDevice *device;
int device_index = 0;
io_service_t ioservice;
if (res != kIOReturnSuccess) {
return;
@ -451,20 +452,11 @@ JoystickDeviceWasAddedCallback(void *ctx, IOReturn res, void *sender, IOHIDDevic
device->instance_id = ++s_joystick_instance_id;
/* We have to do some storage of the io_service_t for SDL_HapticOpenFromJoystick */
#if MAC_OS_X_VERSION_MIN_REQUIRED < 1060
if (IOHIDDeviceGetService != NULL) { /* weak reference: available in 10.6 and later. */
#endif
const io_service_t ioservice = IOHIDDeviceGetService(ioHIDDeviceObject);
ioservice = IOHIDDeviceGetService(ioHIDDeviceObject);
#if SDL_HAPTIC_IOKIT
if ((ioservice) && (FFIsForceFeedback(ioservice) == FF_OK)) {
device->ffservice = ioservice;
MacHaptic_MaybeAddDevice(ioservice);
}
#endif
#if MAC_OS_X_VERSION_MIN_REQUIRED < 1060
if ((ioservice) && (FFIsForceFeedback(ioservice) == FF_OK)) {
device->ffservice = ioservice;
MacHaptic_MaybeAddDevice(ioservice);
}
#endif