mirror of
https://github.com/moonlight-stream/moonlight-qt
synced 2024-12-17 14:43:09 +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
63f0910eac
commit
c7a30d8728
3 changed files with 12 additions and 20 deletions
|
@ -481,7 +481,12 @@ private:
|
||||||
emit pairingCompleted(m_Computer, "The PIN from the PC didn't match. Please try again.");
|
emit pairingCompleted(m_Computer, "The PIN from the PC didn't match. Please try again.");
|
||||||
break;
|
break;
|
||||||
case NvPairingManager::PairState::FAILED:
|
case NvPairingManager::PairState::FAILED:
|
||||||
|
if (m_Computer->currentGameId != 0) {
|
||||||
|
emit pairingCompleted(m_Computer, "You cannot pair while a previous session is still running on the host PC. Quit any running games or reboot the host PC, then try pairing again.");
|
||||||
|
}
|
||||||
|
else {
|
||||||
emit pairingCompleted(m_Computer, "Pairing failed. Please try again.");
|
emit pairingCompleted(m_Computer, "Pairing failed. Please try again.");
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case NvPairingManager::PairState::ALREADY_IN_PROGRESS:
|
case NvPairingManager::PairState::ALREADY_IN_PROGRESS:
|
||||||
emit pairingCompleted(m_Computer, "Another pairing attempt is already in progress.");
|
emit pairingCompleted(m_Computer, "Another pairing attempt is already in progress.");
|
||||||
|
|
|
@ -80,11 +80,6 @@ public:
|
||||||
QString msg = QObject::tr("%1 is already paired").arg(event.computer->name);
|
QString msg = QObject::tr("%1 is already paired").arg(event.computer->name);
|
||||||
emit q->failed(msg);
|
emit q->failed(msg);
|
||||||
}
|
}
|
||||||
else if (event.computer->currentGameId != 0) {
|
|
||||||
m_State = StateFailure;
|
|
||||||
QString msg = QObject::tr("You cannot pair while a previous session is still running on the host PC. Quit any running games or reboot the host PC, then try pairing again.");
|
|
||||||
emit q->failed(msg);
|
|
||||||
}
|
|
||||||
else {
|
else {
|
||||||
Q_ASSERT(!m_PredefinedPin.isEmpty());
|
Q_ASSERT(!m_PredefinedPin.isEmpty());
|
||||||
|
|
||||||
|
|
|
@ -232,7 +232,6 @@ CenteredGridView {
|
||||||
stackView.push(appView)
|
stackView.push(appView)
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (!model.busy) {
|
|
||||||
var pin = computerModel.generatePinString()
|
var pin = computerModel.generatePinString()
|
||||||
|
|
||||||
// Kick off pairing in the background
|
// Kick off pairing in the background
|
||||||
|
@ -242,13 +241,6 @@ CenteredGridView {
|
||||||
pairDialog.pin = pin
|
pairDialog.pin = pin
|
||||||
pairDialog.open()
|
pairDialog.open()
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
// cannot pair while something is streaming or attempting to pair
|
|
||||||
errorDialog.text = qsTr("You cannot pair while a previous session is still running on the host PC. Quit any running games or reboot the host PC, then try pairing again.")
|
|
||||||
errorDialog.helpText = ""
|
|
||||||
errorDialog.open()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else if (!model.online) {
|
} else if (!model.online) {
|
||||||
// Using open() here because it may be activated by keyboard
|
// Using open() here because it may be activated by keyboard
|
||||||
pcContextMenu.open()
|
pcContextMenu.open()
|
||||||
|
|
Loading…
Reference in a new issue