mirror of
https://github.com/moonlight-stream/moonlight-embedded.git
synced 2025-06-30 23:05:43 +00:00
Fixed trigger left/right range
Added .ignore for common build dir
This commit is contained in:
parent
f9a20348ab
commit
9cec4208a4
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
build/
|
@ -186,19 +186,19 @@ int sdlinput_handle_event(SDL_Event* event) {
|
||||
gamepad->leftStickX = event->caxis.value;
|
||||
break;
|
||||
case SDL_CONTROLLER_AXIS_LEFTY:
|
||||
gamepad->leftStickY = -event->caxis.value - 1;
|
||||
gamepad->leftStickY = -SDL_max(event->caxis.value, (short)-32767);
|
||||
break;
|
||||
case SDL_CONTROLLER_AXIS_RIGHTX:
|
||||
gamepad->rightStickX = event->caxis.value;
|
||||
break;
|
||||
case SDL_CONTROLLER_AXIS_RIGHTY:
|
||||
gamepad->rightStickY = -event->caxis.value - 1;
|
||||
gamepad->rightStickY = -SDL_max(event->caxis.value, (short)-32767);
|
||||
break;
|
||||
case SDL_CONTROLLER_AXIS_TRIGGERLEFT:
|
||||
gamepad->leftTrigger = (event->caxis.value >> 8) + 127;
|
||||
gamepad->leftTrigger = (unsigned char)(event->caxis.value * 255UL / 32767);
|
||||
break;
|
||||
case SDL_CONTROLLER_AXIS_TRIGGERRIGHT:
|
||||
gamepad->rightTrigger = (event->caxis.value >> 8) + 127;
|
||||
gamepad->rightTrigger = (unsigned char)(event->caxis.value * 255UL / 32767);
|
||||
break;
|
||||
default:
|
||||
return SDL_NOTHING;
|
||||
|
Loading…
x
Reference in New Issue
Block a user