moonlight-stream / moonlight-embedded

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

Add option for disabling all input (view-only mode) in streaming session #764

Closed hhromic closed 4 years ago

hhromic commented 4 years ago

Description

This PR adds a new option to enable a "view-only" mode, that is, for Moonlight embedded to not send any input back to the host computer and just act as a remote viewer.

NOTE: at the moment this is only implemented for embedded and SDL platforms, not for X11 due to the way the latter's input system is implemented. I may implement for X11 in the future.

I tested this on a Raspberry Pi device only (embedded case), but it should work on SDL-based devices as well. Testing on these is appreciated.

I also cleaned-up a bit some parts of the codebase for consistency, indentation and trailing spaces. Please let me know if you would prefer these changes in a separate PR instead.

Closes #761

Purpose

This feature has been requested in the RetroPie forums from users that use the Virtual Here software, which allows for USB devices on a system (e.g. embedded computer) to be available on another system (e.g. gaming host computer) via network. For these users this alternative is more flexible and seems to work better than the internal Moonlight input system. To use such software, Moonlight should not initialise nor use any input devices connected to the system, therefore the purpose of this new option.

Another use case has been described in the feature request in #761, where input is done directly on the host computer, therefore input from Moonlight embedded is not desired.