Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add controller motion support #1015

Closed

Conversation

FallingSnow
Copy link

@FallingSnow FallingSnow commented May 27, 2023

I wanted to add support for client side cursors (https://github.com/LizardByte/Sunshine/discussions/1276) but figured that might be a little complicated. So I decided to start with another issue I was having, controller motion. I play Zelda: BOW on CEMU via moonlight. There are areas that require controller motion input which I can test on.

I know that this will probably require some tweaks to sunshine too. I had a couple of questions/comments:

  • SDL_GameControllerGetSensorDataRate reports 1000hz for the PS5 controllers gyro. 1000pps might be a lot so can I reduce this to say 2x target frame rate or maybe just 60pps?
  • It does appear that ViGEmBus supports motion: Add touchscreen support for the Dualshock 4 touchpad nefarius/ViGEmBus#11
  • What kind of sunshine changes would need to be made?
  • Would I just add gyro info to NV_MULTI_CONTROLLER_PACKET to send it over the network? What's the best way to do this while maintaining backwards compatibility?

@cgutman
Copy link
Member

cgutman commented Jun 18, 2023

Thanks, I ended up including a controller motion packet extension in my latest batch of Sunshine protocol extension in moonlight-common-c.

https://github.com/moonlight-stream/moonlight-common-c/blob/812ec0e2b7d1a84c13ebae5f821aeedc80bd1ea2/src/Limelight.h#L461-L466
https://github.com/moonlight-stream/moonlight-common-c/blob/812ec0e2b7d1a84c13ebae5f821aeedc80bd1ea2/src/Limelight.h#L704-L710

@cgutman cgutman closed this Jun 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants