Commit ba79a143 authored by Andrew Eikum's avatar Andrew Eikum Committed by Alexandre Julliard

winebus.sys: Report SDL controller buttons in the right order.

parent 564e7b4d
......@@ -808,10 +808,10 @@ static BOOL set_mapped_report_from_event(SDL_Event *event)
case SDL_CONTROLLER_BUTTON_Y: usage = 3; break;
case SDL_CONTROLLER_BUTTON_LEFTSHOULDER: usage = 4; break;
case SDL_CONTROLLER_BUTTON_RIGHTSHOULDER: usage = 5; break;
case SDL_CONTROLLER_BUTTON_LEFTSTICK: usage = 6; break;
case SDL_CONTROLLER_BUTTON_RIGHTSTICK: usage = 7; break;
case SDL_CONTROLLER_BUTTON_START: usage = 8; break;
case SDL_CONTROLLER_BUTTON_BACK: usage = 9; break;
case SDL_CONTROLLER_BUTTON_BACK: usage = 6; break;
case SDL_CONTROLLER_BUTTON_START: usage = 7; break;
case SDL_CONTROLLER_BUTTON_LEFTSTICK: usage = 8; break;
case SDL_CONTROLLER_BUTTON_RIGHTSTICK: usage = 9; break;
case SDL_CONTROLLER_BUTTON_GUIDE: usage = 10; break;
case SDL_CONTROLLER_BUTTON_DPAD_UP:
......
......@@ -375,11 +375,10 @@ void HID_update_state(xinput_controller* device)
case 4: device->state.Gamepad.wButtons |= XINPUT_GAMEPAD_Y; break;
case 5: device->state.Gamepad.wButtons |= XINPUT_GAMEPAD_LEFT_SHOULDER; break;
case 6: device->state.Gamepad.wButtons |= XINPUT_GAMEPAD_RIGHT_SHOULDER; break;
case 7: device->state.Gamepad.wButtons |= XINPUT_GAMEPAD_LEFT_THUMB; break;
case 8: device->state.Gamepad.wButtons |= XINPUT_GAMEPAD_RIGHT_THUMB; break;
case 9: device->state.Gamepad.wButtons |= XINPUT_GAMEPAD_START; break;
case 10: device->state.Gamepad.wButtons |= XINPUT_GAMEPAD_BACK; break;
case 7: device->state.Gamepad.wButtons |= XINPUT_GAMEPAD_BACK; break;
case 8: device->state.Gamepad.wButtons |= XINPUT_GAMEPAD_START; break;
case 9: device->state.Gamepad.wButtons |= XINPUT_GAMEPAD_LEFT_THUMB; break;
case 10: device->state.Gamepad.wButtons |= XINPUT_GAMEPAD_RIGHT_THUMB; break;
case 11: device->state.Gamepad.wButtons |= XINPUT_GAMEPAD_GUIDE; break;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment