mirror of
https://github.com/moonlight-stream/moonlight-chrome.git
synced 2025-08-17 00:26:56 +00:00
If the server is available, ignore the current game in serverinfo
This commit is contained in:
parent
f45ecb9edc
commit
0fe15be7b6
@ -42,6 +42,13 @@ NvHTTP.prototype = {
|
||||
_self.paired = $root.find("PairStatus").text().trim() == 1;
|
||||
_self.currentGame = parseInt($root.find("currentgame").text().trim(), 10);
|
||||
_self.serverMajorVersion = parseInt($root.find("appversion").text().trim().substring(0, 1), 10);
|
||||
|
||||
// GFE 2.8 started keeping currentgame set to the last game played. As a result, it no longer
|
||||
// has the semantics that its name would indicate. To contain the effects of this change as much
|
||||
// as possible, we'll force the current game to zero if the server isn't in a streaming session.
|
||||
if ($root.find("state").text().trim().endsWith("_SERVER_AVAILABLE")) {
|
||||
_self.currentGame = 0;
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user