mirror of
https://github.com/moonlight-stream/moonlight-embedded.git
synced 2025-07-01 23:35:47 +00:00
Allow a pairing attempt even if the PC is busy
Pairing while busy doesn't work with GFE but works with Sunshine
This commit is contained in:
parent
13390594f5
commit
f021439d1b
@ -430,11 +430,6 @@ int gs_pair(PSERVER_DATA server, char* pin) {
|
|||||||
return GS_WRONG_STATE;
|
return GS_WRONG_STATE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (server->currentGame != 0) {
|
|
||||||
gs_error = "The computer is currently in a game. You must close the game before pairing";
|
|
||||||
return GS_WRONG_STATE;
|
|
||||||
}
|
|
||||||
|
|
||||||
unsigned char salt_data[16];
|
unsigned char salt_data[16];
|
||||||
char salt_hex[SIZEOF_AS_HEX_STR(salt_data)];
|
char salt_hex[SIZEOF_AS_HEX_STR(salt_data)];
|
||||||
RAND_bytes(salt_data, sizeof(salt_data));
|
RAND_bytes(salt_data, sizeof(salt_data));
|
||||||
@ -665,6 +660,13 @@ int gs_pair(PSERVER_DATA server, char* pin) {
|
|||||||
|
|
||||||
http_free_data(data);
|
http_free_data(data);
|
||||||
|
|
||||||
|
// If we failed when attempting to pair with a game running, that's likely the issue.
|
||||||
|
// Sunshine supports pairing with an active session, but GFE does not.
|
||||||
|
if (ret != GS_OK && server->currentGame != 0) {
|
||||||
|
gs_error = "The computer is currently in a game. You must close the game before pairing.";
|
||||||
|
ret = GS_WRONG_STATE;
|
||||||
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user