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

[Feature request] Gyroscope/Touchpad transfer to Sunshine host #960

Closed
ld892012 opened this issue Feb 18, 2023 · 22 comments
Closed

[Feature request] Gyroscope/Touchpad transfer to Sunshine host #960

ld892012 opened this issue Feb 18, 2023 · 22 comments

Comments

@ld892012
Copy link
Contributor

Is your feature request related to a problem? Please describe.
Some games needs gyroscope or touchpad to work properly like emulated games of some recent games but only axes and buttons is sent to host by Moonlight.

Describe the solution you'd like
Sunshine gives possibility to emulate DS4 controller instead of X360 but no motion/touchscreen data is transferred.

Describe alternatives you've considered
At this moment, there is no way to send motion data from client to host except for Dolphin or Cemu by create DSU server on client but it not work on all platforms and don't work outside of LAN.

Additional context
I will send the same issue to Sunshine, the combo Moonlight/Sunshine is already a great alternative (selectable screen, multi client, custom resolution/fps) and it can be even more greater with this kind of features 👍

@42Craft
Copy link

42Craft commented Mar 21, 2023

Please I need this

@Rintje
Copy link

Rintje commented Apr 15, 2023

Please I need this

Me too

@shazibjeahngir
Copy link

must have for switch and wii games!

@wz9997438
Copy link

moonlight is great. Would be greater if added

@rzumbado
Copy link

PLEASE!!!!!!!!!!!!!!!!!!!!!!!!!!

@lucascanero
Copy link

Please add this feature

@cgutman
Copy link
Member

cgutman commented Jun 24, 2023

This is supported now with 9af58af but the Sunshine side isn't written yet.

@ld892012
Copy link
Contributor Author

This is supported now with 9af58af but the Sunshine side isn't written yet.

Cool ! You are the best ! 🥇

@cgutman
Copy link
Member

cgutman commented Jul 9, 2023

Support for the full set of DS4 features is available for testing now. Please give it a try and let me know how it performs. You'll need to use dev builds of both Moonlight and Sunshine listed below.

Moonlight Windows: https://ci.appveyor.com/api/buildjobs/lm0v4h2nc8ehy5xe/artifacts/MoonlightPortable-x64-r2079.zip
Moonlight macOS: https://ci.appveyor.com/api/buildjobs/ha66wtquq7u4qkf1/artifacts/Moonlight-r2079.dmg
Sunshine Windows (need to be signed in on GitHub to download): https://github.com/LizardByte/Sunshine/suites/14159253569/artifacts/793377489

See below for updated links

@ld892012
Copy link
Contributor Author

ld892012 commented Jul 9, 2023

Thanks !
Will the Android app can support the device's gyroscope or just the gamepad's ?

@ld892012
Copy link
Contributor Author

ld892012 commented Jul 9, 2023

I've just tested your nightlies and it's work fine but like danaigus i have a problem with Dualsence's triggers (they just do full or nothing)
I have tested with a wired Dualsence and a wired Xbox Series gamepad with DS4 and Xbox emulation, in all cases Dualsence's triggers provide digital output but no analog

@42Craft
Copy link

42Craft commented Jul 9, 2023

Is this a Sony DS4 controller specific implementation or would this also work with Nintendo Switch Pro Controllers?

@ld892012
Copy link
Contributor Author

ld892012 commented Jul 9, 2023

Is this a Sony DS4 controller specific implementation or would this also work with Nintendo Switch Pro Controllers?

I've just test it, NS Pro controller's Accel/Gyro is passed and Capture button work as DS4's Touchpad button

@cgutman
Copy link
Member

cgutman commented Jul 9, 2023

The trigger issue was a bug in the version of SDL included in that build of Moonlight Qt. It is fixed in the builds linked here.

Here are new builds of Moonlight and Sunshine for testing:
Moonlight Windows: https://ci.appveyor.com/api/buildjobs/86obf0nwmskllw7l/artifacts/MoonlightPortable-x64-r2084.zip
Moonlight macOS: https://ci.appveyor.com/api/buildjobs/f4q4opwayiypl4wx/artifacts/Moonlight-r2084.dmg
Sunshine Windows (need to be signed in on GitHub to download): https://github.com/LizardByte/Sunshine/suites/14167610325/artifacts/794048974

@azuwis
Copy link

azuwis commented Jul 10, 2023

What is the current state of Linux support?

I've look at the Sunshine nightly branch, and found Sunshine Linux does not support the feature yet.

Does Moonlight Linux nightly -> Sunshine Windows test build works?

@cgutman
Copy link
Member

cgutman commented Jul 10, 2023

I've look at the Sunshine nightly branch, and found Sunshine Linux does not support the feature yet.

The feature isn't in nightly yet either for Linux or Windows. It's still in PR. LizardByte/Sunshine#1435

What is the current state of Linux support?

The PR above includes Windows support and provides stubs for Linux. Another developer has said he will work on the Linux implementation.

Does Moonlight Linux nightly -> Sunshine Windows test build works?

Yes, that should work if you use the Snap on the edge channel or the AppImage from here https://ci.appveyor.com/api/buildjobs/mtblh3h7dlocn9v2/artifacts/Moonlight-r2084-x86_64.AppImage

One thing to be aware of is that Moonlight uses SDL for controller support and SDL on Linux doesn't have universal support for these extended features (LED control, motion sensors, battery reporting, touchpad input, etc) in the generic Linux gamepad implementation. Many common gamepads (Xbox 360, Xbox One, PS3/4/5, Nintendo Switch) have special HIDAPI driver implementations in SDL that do support those features, but the sandboxes used by Flatpak and Snap may prevent the direct access that HIDAPI requires to work. It's not something I've tested yet.

@CipherLab
Copy link

If this worked on the Atmoshphere (Nintendo Switch) Moonlight client I would be soooo happy.

@ld892012
Copy link
Contributor Author

If this worked on the Atmoshphere (Nintendo Switch) Moonlight client I would be soooo happy.

Maybe you can ask at Moonlight-Switch in his related issue, maybe he can add this feature for his next releases ^^

@ld892012
Copy link
Contributor Author

Now this work fine even with Dualsence's triggers, thank you ! 👍

@cgutman
Copy link
Member

cgutman commented Jul 11, 2023

Sunshine support is merged into the nightly builds and support is present in this client, so going to go ahead and close this as completed. Until new versions of Sunshine and Moonlight are released, you can use the nightly builds for this feature.

@hahawangjing
Copy link

触发问题是 Moonlight Qt 版本中包含的 SDL 版本中的错误。它已修复在此处链接的构建中。

以下是用于测试的 Moonlight 和 Sunshine 的新版本: Moonlight Windows: https: //ci.appveyor.com/api/buildjobs/86obf0nwmskllw7l/artifacts/MoonlightPortable-x64-r2084.zip Moonlight macOS:https://ci.appveyor。 com/api/buildjobs/f4q4opwayiypl4wx/artifacts/Moonlight-r2084.dmg Sunshine Windows(需要登录GitHub才能下载): https: //github.com/LizardByte/Sunshine/suites/14167610325/artifacts/794048974
I am a streaming enthusiast from China. I would like to play Zelda with motion controls on the public internet. Could you provide me with the latest moonlight Windows test build? The official website has not been updated for a long time. The old versions cannot transmit motion data. I would really appreciate it if you could help.

@kidoman
Copy link

kidoman commented Mar 19, 2024

Is this a Sony DS4 controller specific implementation or would this also work with Nintendo Switch Pro Controllers?

I've just test it, NS Pro controller's Accel/Gyro is passed and Capture button work as DS4's Touchpad button

I was trying this on a Fire Stick 4K Max (Gen 1), and the Nintendo Switch Pro Control Gyro does not seem to get passed. What could I be doing wrong?

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

No branches or pull requests