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

* By default this option is set to `false` and can be enabled using the
  new `-viewonly`/`viewonly` command-line/config options.
* When enabled, none of the input modules will be initialised, making
  the streaming session view-only, i.e. no input is sent to host.

To facilitate implementation, SDL initialisation with `sdl_init()` was moved
a bit earlier in the code to decouple from input initialisation.
This commit is contained in:
Hugo Hromic
2019-10-05 19:27:54 +01:00
parent 4ee5015557
commit ecf09e8907
5 changed files with 69 additions and 42 deletions

View File

@@ -41,6 +41,7 @@ typedef struct _CONFIGURATION {
bool fullscreen;
bool unsupported;
bool quitappafter;
bool viewonly;
char* inputs[MAX_INPUTS];
int inputsCount;
enum codecs codec;