moonlight-stream / moonlight-embedded

Gamestream client for embedded systems
https://github.com/moonlight-stream/moonlight-embedded/wiki
GNU General Public License v3.0
1.48k stars 323 forks source link

Fixed trigger left/right range #814

Closed mariotaku closed 3 years ago

mariotaku commented 3 years ago

Description

I found with Xbox One game controllers, trigger/left right stays at half pressed position. After compared to moonlight-qt, I think the reason is because SDL_CONTROLLER_AXIS_TRIGGER(LEFT|RIGHT) only has range in 0~32767, and -1~-32768 are not used.

Purpose This PR maps trigger value 0~32767 to 0~255, follows logic from moonlight-qt Also added .ignore for common build dir