mirror of
https://github.com/moonlight-stream/moonlight-qt
synced 2024-12-14 05:12:27 +00:00
Fix analog sticks and triggers
This commit is contained in:
parent
c6b19826d3
commit
16d7dca784
1 changed files with 4 additions and 4 deletions
|
@ -347,19 +347,19 @@ void SdlHandleControllerAxisEvent(SDL_ControllerAxisEvent* event)
|
|||
state->lsX = event->value;
|
||||
break;
|
||||
case SDL_CONTROLLER_AXIS_LEFTY:
|
||||
state->lsY = event->value;
|
||||
state->lsY = -event->value;
|
||||
break;
|
||||
case SDL_CONTROLLER_AXIS_RIGHTX:
|
||||
state->rsX = event->value;
|
||||
break;
|
||||
case SDL_CONTROLLER_AXIS_RIGHTY:
|
||||
state->rsY = event->value;
|
||||
state->rsY = -event->value;
|
||||
break;
|
||||
case SDL_CONTROLLER_AXIS_TRIGGERLEFT:
|
||||
state->lt = (unsigned char)((event->value + 32768UL) * 255 / 65535);
|
||||
state->lt = (unsigned char)(event->value * 255UL / 32767);
|
||||
break;
|
||||
case SDL_CONTROLLER_AXIS_TRIGGERRIGHT:
|
||||
state->rt = (unsigned char)((event->value + 32768UL) * 255 / 65535);
|
||||
state->rt = (unsigned char)(event->value * 255UL / 32767);
|
||||
break;
|
||||
default:
|
||||
SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION,
|
||||
|
|
Loading…
Reference in a new issue