mirror of https://github.com/encounter/SDL.git
Backout prior fix for Bug 5034, which needs more research
This backs-out the change, https://hg.libsdl.org/SDL/rev/14c961903135
This commit is contained in:
parent
55a2a12ddf
commit
36d5845152
|
@ -125,7 +125,6 @@ static recDevice *
|
||||||
FreeDevice(recDevice *removeDevice)
|
FreeDevice(recDevice *removeDevice)
|
||||||
{
|
{
|
||||||
recDevice *pDeviceNext = NULL;
|
recDevice *pDeviceNext = NULL;
|
||||||
SDL_Joystick *joystick = NULL;
|
|
||||||
if (removeDevice) {
|
if (removeDevice) {
|
||||||
if (removeDevice->deviceRef) {
|
if (removeDevice->deviceRef) {
|
||||||
IOHIDDeviceUnscheduleFromRunLoop(removeDevice->deviceRef, CFRunLoopGetCurrent(), SDL_JOYSTICK_RUNLOOP_MODE);
|
IOHIDDeviceUnscheduleFromRunLoop(removeDevice->deviceRef, CFRunLoopGetCurrent(), SDL_JOYSTICK_RUNLOOP_MODE);
|
||||||
|
@ -147,14 +146,6 @@ FreeDevice(recDevice *removeDevice)
|
||||||
}
|
}
|
||||||
removeDevice->pNext = NULL;
|
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 */
|
/* free element lists */
|
||||||
FreeElementList(removeDevice->firstAxis);
|
FreeElementList(removeDevice->firstAxis);
|
||||||
FreeElementList(removeDevice->firstButton);
|
FreeElementList(removeDevice->firstButton);
|
||||||
|
@ -880,10 +871,6 @@ DARWIN_JoystickRumble(SDL_Joystick * joystick, Uint16 low_frequency_rumble, Uint
|
||||||
/* Scale and average the two rumble strengths */
|
/* Scale and average the two rumble strengths */
|
||||||
Sint16 magnitude = (Sint16)(((low_frequency_rumble / 2) + (high_frequency_rumble / 2)) / 2);
|
Sint16 magnitude = (Sint16)(((low_frequency_rumble / 2) + (high_frequency_rumble / 2)) / 2);
|
||||||
|
|
||||||
if (!device) {
|
|
||||||
return SDL_SetError("Rumble failed, device disconnected");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!device->ffservice) {
|
if (!device->ffservice) {
|
||||||
return SDL_Unsupported();
|
return SDL_Unsupported();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue