mirror of
https://github.com/encounter/SDL.git
synced 2025-05-21 06:41:40 +00:00
Fixed sensor axes in vertical mode
This commit is contained in:
parent
b4c25f5714
commit
bd6afc2317
@ -1793,7 +1793,7 @@ static void SendSensorUpdate(SDL_Joystick *joystick, SDL_DriverSwitch_Context *c
|
||||
}
|
||||
|
||||
if (ctx->m_eControllerType == k_eSwitchDeviceInfoControllerType_JoyConLeft &&
|
||||
!ctx->device->parent) {
|
||||
!ctx->device->parent && !ctx->m_bVerticalMode) {
|
||||
/* Mini-gamepad mode, swap some axes around */
|
||||
float tmp = data[2];
|
||||
data[2] = -data[0];
|
||||
@ -1801,7 +1801,7 @@ static void SendSensorUpdate(SDL_Joystick *joystick, SDL_DriverSwitch_Context *c
|
||||
}
|
||||
|
||||
if (ctx->m_eControllerType == k_eSwitchDeviceInfoControllerType_JoyConRight &&
|
||||
!ctx->device->parent) {
|
||||
!ctx->device->parent && !ctx->m_bVerticalMode) {
|
||||
/* Mini-gamepad mode, swap some axes around */
|
||||
float tmp = data[2];
|
||||
data[2] = data[0];
|
||||
|
Loading…
x
Reference in New Issue
Block a user