Protocol extension: DualSense adaptive trigger support#102
Protocol extension: DualSense adaptive trigger support#102cgutman merged 4 commits intomoonlight-stream:masterfrom
Conversation
src/ControlStream.c
Outdated
| // if you are curious about the actual data, there's some rationale in | ||
| // https://gist.github.com/Nielk1/6d54cc2c00d2201ccb8c2720ad7538db | ||
| uint8_t *left; | ||
| uint8_t *right; |
There was a problem hiding this comment.
Any reason not to just define the left[DS_EFFECT_PAYLOAD_SIZE] and right[DS_EFFECT_PAYLOAD_SIZE] arrays here and avoid having additional allocations?
There was a problem hiding this comment.
I was trying to keep the copies at a minimum, and I started with a pointer in the callback function definition. I agree though, better to keep the code simple and avoid another mallov; I've updated the code to use plain arrays instead.
src/ControlStream.c
Outdated
| // https://gist.github.com/Nielk1/6d54cc2c00d2201ccb8c2720ad7538db | ||
| uint8_t *left; | ||
| uint8_t *right; | ||
| } ds_adaptive_trigger; |
There was a problem hiding this comment.
Please use camel case for variables, arguments, and fields.
|
I've pushed a few fixes and tested all the patches together in Helldivers 2, which seems to have a lot of effects. I should've addressed all comments. Let me know what you think! |
|
Sorry about that, I should have fixed all the remaining cases. |
This is part of a series of PRs:
Moonlight client
moonlight-common-cand exposes the adaptive trigger events via SDLSunshine server
moonlight-common-candinputtinoand delivers the adaptive trigger events to Moonlight clients20250319_175750.mp4