Skip to content
Permalink
Browse files

Backout prior fix for Bug 5034, which needs more research

  • Loading branch information
DavidLudwig committed Mar 17, 2020
1 parent 55a2a12 commit 36d58451528d7aad8cdc255d7592442e9e25b7fa
Showing with 0 additions and 13 deletions.
  1. +0 −13 src/joystick/darwin/SDL_sysjoystick.c
@@ -125,7 +125,6 @@ static recDevice *
FreeDevice(recDevice *removeDevice)
{
recDevice *pDeviceNext = NULL;
SDL_Joystick *joystick = NULL;
if (removeDevice) {
if (removeDevice->deviceRef) {
IOHIDDeviceUnscheduleFromRunLoop(removeDevice->deviceRef, CFRunLoopGetCurrent(), SDL_JOYSTICK_RUNLOOP_MODE);
@@ -147,14 +146,6 @@ FreeDevice(recDevice *removeDevice)
}
removeDevice->pNext = NULL;

/* clear out any reference to this recDevice that are being
* held by a live instance of SDL_Joystick
*/
joystick = SDL_JoystickFromInstanceID(removeDevice->instance_id);
if (joystick) {
joystick->hwdata = NULL;
}

/* free element lists */
FreeElementList(removeDevice->firstAxis);
FreeElementList(removeDevice->firstButton);
@@ -880,10 +871,6 @@ DARWIN_JoystickRumble(SDL_Joystick * joystick, Uint16 low_frequency_rumble, Uint
/* Scale and average the two rumble strengths */
Sint16 magnitude = (Sint16)(((low_frequency_rumble / 2) + (high_frequency_rumble / 2)) / 2);

if (!device) {
return SDL_SetError("Rumble failed, device disconnected");
}

if (!device->ffservice) {
return SDL_Unsupported();
}

0 comments on commit 36d5845

Please sign in to comment.