winebus.sys: Report SDL controller buttons in the right order.
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
564e7b4db9
commit
ba79a14369
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue