mirror of
https://github.com/moonlight-stream/moonlight-embedded.git
synced 2025-07-01 15:25:35 +00:00
Show information about host system
This commit is contained in:
parent
129962d126
commit
43c06a2338
@ -172,7 +172,6 @@ static int load_server_status(PSERVER_DATA server) {
|
||||
char *stateText = NULL;
|
||||
char *heightText = NULL;
|
||||
char *serverCodecModeSupportText = NULL;
|
||||
char *maxLumaPixelsHEVC = NULL;
|
||||
|
||||
uuid_t uuid;
|
||||
char uuid_str[37];
|
||||
@ -215,14 +214,12 @@ 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, "GfeVersion", &server->gfeVersion) != GS_OK)
|
||||
goto cleanup;
|
||||
|
||||
server->paired = pairedText != NULL && strcmp(pairedText, "1") == 0;
|
||||
server->currentGame = currentGameText == NULL ? 0 : atoi(currentGameText);
|
||||
server->supports4K = heightText != NULL && serverCodecModeSupportText != NULL && atoi(heightText) >= 2160;
|
||||
server->maxLumaPixelsHEVC = maxLumaPixelsHEVC == NULL ? 0 : atol(maxLumaPixelsHEVC);
|
||||
char *versionSep = strstr(versionText, ".");
|
||||
if (versionSep != NULL) {
|
||||
*versionSep = 0;
|
||||
}
|
||||
server->serverMajorVersion = atoi(versionText);
|
||||
if (strstr(stateText, "_SERVER_AVAILABLE")) {
|
||||
// After GFE 2.8, current game remains set even after streaming
|
||||
@ -251,9 +248,6 @@ static int load_server_status(PSERVER_DATA server) {
|
||||
if (serverCodecModeSupportText != NULL)
|
||||
free(serverCodecModeSupportText);
|
||||
|
||||
if (maxLumaPixelsHEVC != NULL)
|
||||
free(maxLumaPixelsHEVC);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -28,11 +28,11 @@
|
||||
typedef struct _SERVER_DATA {
|
||||
const char* address;
|
||||
char* gpuType;
|
||||
char* gfeVersion;
|
||||
bool paired;
|
||||
bool supports4K;
|
||||
int currentGame;
|
||||
int serverMajorVersion;
|
||||
long maxLumaPixelsHEVC;
|
||||
} SERVER_DATA, *PSERVER_DATA;
|
||||
|
||||
int gs_init(PSERVER_DATA server, const char *keyDirectory);
|
||||
|
@ -201,6 +201,7 @@ int main(int argc, char* argv[]) {
|
||||
exit(-1);
|
||||
}
|
||||
config.address[0] = 0;
|
||||
printf("Searching for server...\n");
|
||||
gs_discover_server(config.address);
|
||||
if (config.address[0] == 0) {
|
||||
fprintf(stderr, "Autodiscovery failed. Specify an IP address next time.\n");
|
||||
@ -229,6 +230,8 @@ int main(int argc, char* argv[]) {
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
printf("NVIDIA %s, GFE %s (protocol version %d)\n", server.gpuType, server.gfeVersion, server.serverMajorVersion);
|
||||
|
||||
if (strcmp("list", config.action) == 0) {
|
||||
pair_check(&server);
|
||||
applist(&server);
|
||||
|
Loading…
x
Reference in New Issue
Block a user