Don't filter SOPS option by active resolutions with Sunshine

This commit is contained in:
Cameron Gutman 2023-09-11 21:25:29 -05:00
parent 6e34c21175
commit 24ee6f96e1

View File

@ -1327,10 +1327,12 @@ bool Session::startConnectionAsync()
Q_ASSERT(m_Computer->currentGameId == 0 || Q_ASSERT(m_Computer->currentGameId == 0 ||
m_Computer->currentGameId == m_App.id); m_Computer->currentGameId == m_App.id);
// SOPS will set all settings to 720p60 if it doesn't recognize bool enableGameOptimizations;
if (m_Computer->isNvidiaServerSoftware) {
// GFE will set all settings to 720p60 if it doesn't recognize
// the chosen resolution. Avoid that by disabling SOPS when it // the chosen resolution. Avoid that by disabling SOPS when it
// is not streaming a supported resolution. // is not streaming a supported resolution.
bool enableGameOptimizations = false; enableGameOptimizations = false;
for (const NvDisplayMode &mode : m_Computer->displayModes) { for (const NvDisplayMode &mode : m_Computer->displayModes) {
if (mode.width == m_StreamConfig.width && if (mode.width == m_StreamConfig.width &&
mode.height == m_StreamConfig.height) { mode.height == m_StreamConfig.height) {
@ -1341,6 +1343,12 @@ bool Session::startConnectionAsync()
break; break;
} }
} }
}
else {
// Always send SOPS to Sunshine because we may repurpose the
// option to control whether the display mode is adjusted
enableGameOptimizations = m_Preferences->gameOptimizations;
}
QString rtspSessionUrl; QString rtspSessionUrl;