mirror of
https://github.com/encounter/SDL.git
synced 2025-12-09 21:47:44 +00:00
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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user