Skip to content
Permalink
Browse files

Use --unsupported option also for unsupported resolutions

  • Loading branch information...
irtimmer authored and d3m3vilurr committed Jun 16, 2017
1 parent e2d7910 commit e3cad3932d31252b5c28bcfdbd998bff1b5efd54
Showing with 13 additions and 9 deletions.
  1. +5 −4 libgamestream/client.c
  2. +3 −2 libgamestream/client.h
  3. +2 −1 src/config.c
  4. +1 −0 src/config.h
  5. +2 −2 src/gui/ui_connect.c
@@ -277,7 +277,7 @@ static int load_server_status(PSERVER_DATA server) {
i++;
} while (ret != GS_OK && i < 2);

if (ret == GS_OK) {
if (ret == GS_OK && !server->unsupported) {
if (server->serverMajorVersion > MAX_SUPPORTED_GFE_VERSION) {
gs_error = "Ensure you're running the latest version of Moonlight Embedded or downgrade GeForce Experience and try again";
ret = GS_UNSUPPORTED_VERSION;
@@ -658,7 +658,7 @@ int gs_applist(PSERVER_DATA server, PAPP_LIST *list) {
return ret;
}

int gs_start_app(PSERVER_DATA server, STREAM_CONFIGURATION *config, int appId, bool sops, bool localaudio, int gamepad_mask, bool custom_res) {
int gs_start_app(PSERVER_DATA server, STREAM_CONFIGURATION *config, int appId, bool sops, bool localaudio, int gamepad_mask) {
int ret = GS_OK;
uuid_t uuid;
char* result = NULL;
@@ -673,7 +673,7 @@ int gs_start_app(PSERVER_DATA server, STREAM_CONFIGURATION *config, int appId, b
mode = mode->next;
}

if (!custom_res && !correct_mode)
if (!correct_mode && !server->unsupported)
return GS_NOT_SUPPORTED_MODE;

if (config->height >= 2160 && !server->supports4K)
@@ -761,7 +761,7 @@ int gs_quit_app(PSERVER_DATA server) {
return ret;
}

int gs_init(PSERVER_DATA server, char *address, const char *keyDirectory, int log_level) {
int gs_init(PSERVER_DATA server, char *address, const char *keyDirectory, int log_level, bool unsupported) {
mkdirtree(keyDirectory);
if (load_unique_id(keyDirectory) != GS_OK)
return GS_FAILED;
@@ -773,5 +773,6 @@ int gs_init(PSERVER_DATA server, char *address, const char *keyDirectory, int lo

LiInitializeServerInformation(&server->serverInfo);
server->serverInfo.address = address;
server->unsupported = unsupported;
return load_server_status(server);
}
@@ -33,15 +33,16 @@ typedef struct _SERVER_DATA {
char* gpuType;
bool paired;
bool supports4K;
bool unsupported;
int currentGame;
int serverMajorVersion;
char* gsVersion;
PDISPLAY_MODE modes;
SERVER_INFORMATION serverInfo;
} SERVER_DATA, *PSERVER_DATA;

int gs_init(PSERVER_DATA server, char* address, const char *keyDirectory, int log_level);
int gs_start_app(PSERVER_DATA server, PSTREAM_CONFIGURATION config, int appId, bool sops, bool localaudio, int gamepad_mask, bool custom_res);
int gs_init(PSERVER_DATA server, char* address, const char *keyDirectory, int logLevel, bool unsupported);
int gs_start_app(PSERVER_DATA server, PSTREAM_CONFIGURATION config, int appId, bool sops, bool localaudio, int gamepad_mask);
int gs_applist(PSERVER_DATA server, PAPP_LIST *app_list);
int gs_unpair(PSERVER_DATA server);
int gs_pair(PSERVER_DATA server, char* pin);
@@ -158,7 +158,7 @@ static void parse_argument(int c, char* value, PCONFIGURATION config) {
config->stream.supportsHevc = true;
break;
case 'y':
config->unsupported_version = true;
config->unsupported = true;
break;
case 1:
if (config->action == NULL)
@@ -313,6 +313,7 @@ void config_parse(int argc, char* argv[], PCONFIGURATION config) {
config->sops = true;
config->localaudio = false;
config->fullscreen = true;
config->unsupported = false;
config->unsupported_version = false;
config->save_debug_log = false;
config->disable_powersave = true;
@@ -54,6 +54,7 @@ typedef struct _CONFIGURATION {
bool fullscreen;
bool forcehw;
bool unsupported_version;
bool unsupported;
struct touchscreen_deadzone back_deadzone;
struct special_keys special_keys;
bool disable_powersave;
@@ -55,7 +55,7 @@ int get_app_name(PAPP_LIST list, int id, char *name) {

void ui_connect_stream(PSERVER_DATA server, int appId) {
// TODO support force controller id
int ret = gs_start_app(server, &config.stream, appId, config.sops, config.localaudio, 1, true);
int ret = gs_start_app(server, &config.stream, appId, config.sops, config.localaudio, 1);
if (ret < 0) {
if (ret == GS_NOT_SUPPORTED_4K)
display_error("Server doesn't support 4K\n");
@@ -228,7 +228,7 @@ int ui_connect(char *address) {
int ret;
if (!connection_is_ready()) {
flash_message("Connecting to:\n %s...", address);
ret = gs_init(&server, address, config.key_dir, 0);
ret = gs_init(&server, address, config.key_dir, 0, true);
if (ret == GS_OUT_OF_MEMORY) {
display_error("Not enough memory");
return 0;

0 comments on commit e3cad39

Please sign in to comment.
You can’t perform that action at this time.