mirror of
https://github.com/moonlight-stream/moonlight-embedded.git
synced 2025-07-02 15:56:02 +00:00
Allow unsupported version to try to run
This commit is contained in:
parent
b30cf20f8c
commit
e12beeaef3
@ -65,6 +65,7 @@ static struct option long_options[] = {
|
||||
{"fps", required_argument, NULL, 'v'},
|
||||
{"forcehw", no_argument, NULL, 'w'},
|
||||
{"forcehevc", no_argument, NULL, 'x'},
|
||||
{"unsupported", no_argument, NULL, 'y'},
|
||||
{0, 0, 0, 0},
|
||||
};
|
||||
|
||||
@ -205,6 +206,9 @@ static void parse_argument(int c, char* value, PCONFIGURATION config) {
|
||||
case 'x':
|
||||
config->stream.supportsHevc = true;
|
||||
break;
|
||||
case 'y':
|
||||
config->unsupported_version = true;
|
||||
break;
|
||||
case 1:
|
||||
if (config->action == NULL)
|
||||
config->action = value;
|
||||
@ -296,6 +300,7 @@ void config_parse(int argc, char* argv[], PCONFIGURATION config) {
|
||||
config->sops = true;
|
||||
config->localaudio = false;
|
||||
config->fullscreen = true;
|
||||
config->unsupported_version = false;
|
||||
|
||||
config->inputsCount = 0;
|
||||
config->mapping = get_path("mappings/default.conf", getenv("XDG_DATA_DIRS"));
|
||||
@ -313,7 +318,7 @@ void config_parse(int argc, char* argv[], PCONFIGURATION config) {
|
||||
} else {
|
||||
int option_index = 0;
|
||||
int c;
|
||||
while ((c = getopt_long_only(argc, argv, "-abc:d:efg:h:i:j:k:lm:no:p:q:r:stuv:w:x", long_options, &option_index)) != -1) {
|
||||
while ((c = getopt_long_only(argc, argv, "-abc:d:efg:h:i:j:k:lm:no:p:q:r:stuv:w:xy", long_options, &option_index)) != -1) {
|
||||
parse_argument(c, optarg, config);
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* This file is part of Moonlight Embedded.
|
||||
*
|
||||
* Copyright (C) 2015 Iwan Timmer
|
||||
* Copyright (C) 2015, 2016 Iwan Timmer
|
||||
*
|
||||
* Moonlight is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -41,6 +41,7 @@ typedef struct _CONFIGURATION {
|
||||
bool localaudio;
|
||||
bool fullscreen;
|
||||
bool forcehw;
|
||||
bool unsupported_version;
|
||||
struct input_config inputs[MAX_INPUTS];
|
||||
int inputsCount;
|
||||
} CONFIGURATION, *PCONFIGURATION;
|
||||
|
@ -227,8 +227,10 @@ int main(int argc, char* argv[]) {
|
||||
fprintf(stderr, "Invalid data received from server: %s\n", config.address, gs_error);
|
||||
exit(-1);
|
||||
} else if (ret == GS_UNSUPPORTED_VERSION) {
|
||||
fprintf(stderr, "Unsupported version: %s\n", gs_error);
|
||||
exit(-1);
|
||||
if (!config.unsupported_version) {
|
||||
fprintf(stderr, "Unsupported version: %s\n", gs_error);
|
||||
exit(-1);
|
||||
}
|
||||
} else if (ret != GS_OK) {
|
||||
fprintf(stderr, "Can't connect to server %s\n", config.address);
|
||||
exit(-1);
|
||||
|
Loading…
x
Reference in New Issue
Block a user