mirror of https://github.com/encounter/SDL.git
Backed out changeset c29d04c3fa49
This commit is contained in:
parent
74ba3cb45b
commit
dc36f133b4
|
@ -240,7 +240,6 @@ RAWINPUT_DeviceFromHandle(HANDLE hDevice)
|
|||
static SDL_HIDAPI_DeviceDriver *
|
||||
RAWINPUT_GetDeviceDriver(SDL_RAWINPUT_Device *device)
|
||||
{
|
||||
SDL_GameControllerType type;
|
||||
int i;
|
||||
|
||||
if (SDL_ShouldIgnoreJoystick(device->name, device->guid)) {
|
||||
|
@ -254,7 +253,7 @@ RAWINPUT_GetDeviceDriver(SDL_RAWINPUT_Device *device)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
type = SDL_GetJoystickGameControllerType("", device->vendor_id, device->product_id, -1, 0, 0, 0);
|
||||
SDL_GameControllerType type = SDL_GetJoystickGameControllerType("", device->vendor_id, device->product_id, -1, 0, 0, 0);
|
||||
|
||||
for (i = 0; i < SDL_arraysize(SDL_RAWINPUT_drivers); ++i) {
|
||||
SDL_HIDAPI_DeviceDriver *driver = SDL_RAWINPUT_drivers[i];
|
||||
|
@ -364,8 +363,6 @@ static void
|
|||
RAWINPUT_DelDevice(SDL_RAWINPUT_Device *device, SDL_bool send_event)
|
||||
{
|
||||
SDL_RAWINPUT_Device *curr, *last;
|
||||
SDL_Joystick *joystick;
|
||||
|
||||
for (curr = SDL_RAWINPUT_devices, last = NULL; curr; last = curr, curr = curr->next) {
|
||||
if (curr == device) {
|
||||
if (last) {
|
||||
|
@ -375,7 +372,7 @@ RAWINPUT_DelDevice(SDL_RAWINPUT_Device *device, SDL_bool send_event)
|
|||
}
|
||||
--SDL_RAWINPUT_numjoysticks;
|
||||
|
||||
joystick = device->joystick;
|
||||
SDL_Joystick *joystick = device->joystick;
|
||||
if (joystick) {
|
||||
/* Detach from joystick */
|
||||
RAWINPUT_JoystickClose(joystick);
|
||||
|
|
Loading…
Reference in New Issue