From 7e73de80b3fcce814698202ccbbee6b955fbaa7b Mon Sep 17 00:00:00 2001 From: Iwan Timmer Date: Sat, 27 May 2017 16:10:59 +0200 Subject: [PATCH] Get additional server information --- libgamestream/client.c | 5 ++++- libgamestream/client.h | 3 ++- src/main.c | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/libgamestream/client.c b/libgamestream/client.c index bc6c020..24ce1d4 100644 --- a/libgamestream/client.c +++ b/libgamestream/client.c @@ -1,7 +1,7 @@ /* * This file is part of Moonlight Embedded. * - * Copyright (C) 2015-2016 Iwan Timmer + * Copyright (C) 2015-2017 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 @@ -226,6 +226,9 @@ static int load_server_status(PSERVER_DATA server) { if (xml_search(data->memory, data->size, "gputype", &server->gpuType) != GS_OK) goto cleanup; + if (xml_search(data->memory, data->size, "GsVersion", &server->gsVersion) != GS_OK) + goto cleanup; + if (xml_search(data->memory, data->size, "GfeVersion", (char**) &server->serverInfo.serverInfoGfeVersion) != GS_OK) goto cleanup; diff --git a/libgamestream/client.h b/libgamestream/client.h index f8b821d..d1b8f69 100644 --- a/libgamestream/client.h +++ b/libgamestream/client.h @@ -1,7 +1,7 @@ /* * This file is part of Moonlight Embedded. * - * Copyright (C) 2015, 2016 Iwan Timmer + * Copyright (C) 2015-2017 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 @@ -35,6 +35,7 @@ typedef struct _SERVER_DATA { bool supports4K; int currentGame; int serverMajorVersion; + char* gsVersion; SERVER_INFORMATION serverInfo; } SERVER_DATA, *PSERVER_DATA; diff --git a/src/main.c b/src/main.c index 71c2696..9c45aee 100644 --- a/src/main.c +++ b/src/main.c @@ -227,7 +227,7 @@ int main(int argc, char* argv[]) { exit(-1); } - printf("NVIDIA %s, GFE %s (protocol version %d)\n", server.gpuType, server.serverInfo.serverInfoGfeVersion, server.serverMajorVersion); + printf("NVIDIA %s, GFE %s (%s, %s)\n", server.gpuType, server.serverInfo.serverInfoGfeVersion, server.gsVersion, server.serverInfo.serverInfoAppVersion); if (strcmp("list", config.action) == 0) { pair_check(&server);