mirror of
https://github.com/Ryujinx/SDL.git
synced 2025-01-11 00:55:36 +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 &&
|
if (ctx->m_eControllerType == k_eSwitchDeviceInfoControllerType_JoyConLeft &&
|
||||||
!ctx->device->parent) {
|
!ctx->device->parent && !ctx->m_bVerticalMode) {
|
||||||
/* Mini-gamepad mode, swap some axes around */
|
/* Mini-gamepad mode, swap some axes around */
|
||||||
float tmp = data[2];
|
float tmp = data[2];
|
||||||
data[2] = -data[0];
|
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 &&
|
if (ctx->m_eControllerType == k_eSwitchDeviceInfoControllerType_JoyConRight &&
|
||||||
!ctx->device->parent) {
|
!ctx->device->parent && !ctx->m_bVerticalMode) {
|
||||||
/* Mini-gamepad mode, swap some axes around */
|
/* Mini-gamepad mode, swap some axes around */
|
||||||
float tmp = data[2];
|
float tmp = data[2];
|
||||||
data[2] = data[0];
|
data[2] = data[0];
|
||||||
|
|
Loading…
Reference in a new issue