From bd6afc2317b8f825c259b1593cda31a9f592408f Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Sun, 2 Oct 2022 10:15:39 -0700 Subject: [PATCH] Fixed sensor axes in vertical mode --- src/joystick/hidapi/SDL_hidapi_switch.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/joystick/hidapi/SDL_hidapi_switch.c b/src/joystick/hidapi/SDL_hidapi_switch.c index 8a61031a5..8eaadb31e 100644 --- a/src/joystick/hidapi/SDL_hidapi_switch.c +++ b/src/joystick/hidapi/SDL_hidapi_switch.c @@ -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];