mirror of
https://github.com/moonlight-stream/moonlight-chrome.git
synced 2025-08-17 16:46:31 +00:00
parent
e555bd8282
commit
bc49cff3c2
@ -89,6 +89,7 @@ function pairPushed() {
|
|||||||
api = new NvHTTP(target, myUniqueid);
|
api = new NvHTTP(target, myUniqueid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
api.refreshServerInfoUnpaired().then(function (ret) {
|
api.refreshServerInfoUnpaired().then(function (ret) {
|
||||||
|
|
||||||
if(api.currentGame != 0) { // make sure host isn't already in a game
|
if(api.currentGame != 0) { // make sure host isn't already in a game
|
||||||
@ -96,6 +97,12 @@ function pairPushed() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
api.refreshServerInfo().then(function (ret) {
|
||||||
|
if(api.paired) { // don't pair if you don't have to
|
||||||
|
snackbarLog('already paired with ' + target + '!');
|
||||||
|
return;
|
||||||
|
} else { // we're not already paired. pair now.
|
||||||
|
|
||||||
$('#pairButton')[0].innerHTML = 'Pairing...';
|
$('#pairButton')[0].innerHTML = 'Pairing...';
|
||||||
snackbarLog('Attempting pair to: ' + target);
|
snackbarLog('Attempting pair to: ' + target);
|
||||||
var randomNumber = String("0000" + (Math.random()*10000|0)).slice(-4);
|
var randomNumber = String("0000" + (Math.random()*10000|0)).slice(-4);
|
||||||
@ -132,6 +139,9 @@ function pairPushed() {
|
|||||||
}
|
}
|
||||||
console.log("pairing attempt returned: " + ret3);
|
console.log("pairing attempt returned: " + ret3);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user