Tell the host if we want gamepads to persist after disconnection

This commit is contained in:
Cameron Gutman 2023-02-20 16:52:28 -06:00
parent 90e25e60d6
commit 35e226273c
3 changed files with 5 additions and 1 deletions

View file

@ -194,6 +194,7 @@ NvHTTP::startApp(QString verb,
bool sops, bool sops,
bool localAudio, bool localAudio,
int gamepadMask, int gamepadMask,
bool persistGameControllersOnDisconnect,
QString& rtspSessionUrl) QString& rtspSessionUrl)
{ {
int riKeyId; int riKeyId;
@ -221,7 +222,8 @@ NvHTTP::startApp(QString verb,
"&localAudioPlayMode="+QString::number(localAudio ? 1 : 0)+ "&localAudioPlayMode="+QString::number(localAudio ? 1 : 0)+
"&surroundAudioInfo="+QString::number(SURROUNDAUDIOINFO_FROM_AUDIO_CONFIGURATION(streamConfig->audioConfiguration))+ "&surroundAudioInfo="+QString::number(SURROUNDAUDIOINFO_FROM_AUDIO_CONFIGURATION(streamConfig->audioConfiguration))+
"&remoteControllersBitmap="+QString::number(gamepadMask)+ "&remoteControllersBitmap="+QString::number(gamepadMask)+
"&gcmap="+QString::number(gamepadMask), "&gcmap="+QString::number(gamepadMask)+
"&gcpersist="+QString::number(persistGameControllersOnDisconnect ? 1 : 0),
LAUNCH_TIMEOUT_MS); LAUNCH_TIMEOUT_MS);
qInfo() << "Launch response:" << response; qInfo() << "Launch response:" << response;

View file

@ -169,6 +169,7 @@ public:
bool sops, bool sops,
bool localAudio, bool localAudio,
int gamepadMask, int gamepadMask,
bool persistGameControllersOnDisconnect,
QString& rtspSessionUrl); QString& rtspSessionUrl);
QVector<NvApp> QVector<NvApp>

View file

@ -1178,6 +1178,7 @@ bool Session::startConnectionAsync()
enableGameOptimizations, enableGameOptimizations,
m_Preferences->playAudioOnHost, m_Preferences->playAudioOnHost,
m_InputHandler->getAttachedGamepadMask(), m_InputHandler->getAttachedGamepadMask(),
!m_Preferences->multiController,
rtspSessionUrl); rtspSessionUrl);
} catch (const GfeHttpResponseException& e) { } catch (const GfeHttpResponseException& e) {
emit displayLaunchError(tr("GeForce Experience returned error: %1").arg(e.toQString())); emit displayLaunchError(tr("GeForce Experience returned error: %1").arg(e.toQString()));