Update dragonrelaybackend.cpp

This commit is contained in:
Zac Gaetano 2026-05-06 20:43:32 -04:00
parent ef91b5385d
commit 8cc9d2dc4d

View file

@ -117,6 +117,11 @@ void DragonRelayBackend::streamHost(const QString &ip, const QString &app, int d
ip,
app
};
if (displayIndex > 0) {
// --display <N>: moonlight-qt CLI display selection flag (0 = primary)
// Verify with: moonlight --help
args << QStringLiteral("--display") << QString::number(displayIndex);
}
QProcess::startDetached(QStringLiteral("moonlight"), args);
#elif defined(Q_OS_MACOS)
QStringList args{
@ -124,6 +129,11 @@ void DragonRelayBackend::streamHost(const QString &ip, const QString &app, int d
ip,
app
};
if (displayIndex > 0) {
// --display <N>: moonlight-qt CLI display selection flag (0 = primary)
// Verify with: moonlight --help
args << QStringLiteral("--display") << QString::number(displayIndex);
}
QProcess::startDetached(QStringLiteral("moonlight"), args);
#else
QStringList args{
@ -131,16 +141,13 @@ void DragonRelayBackend::streamHost(const QString &ip, const QString &app, int d
ip,
app
};
if (displayIndex > 0) {
// --display <N>: moonlight-qt CLI display selection flag (0 = primary)
// Verify with: moonlight --help
args << QStringLiteral("--display") << QString::number(displayIndex);
}
QProcess::startDetached(QStringLiteral("moonlight"), args);
#endif
// TODO: Pass displayIndex to Moonlight stream command via the --display or
// --monitor flag. moonlight-qt uses NvHTTP::launchApp() with a "display"
// parameter. See app/streaming/session.cpp launchSession() for where
// display selection hooks should be added.
if (displayIndex > 0) {
qDebug() << " display index:" << displayIndex << "(Moonlight --display wiring pending)";
}
}
// ── displaysForHost ───────────────────────────────────────────────────────────