mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-06-18 14:40:56 +00:00
Only enable game optimizations when streaming at officially supported resolutions
This commit is contained in:
@@ -594,6 +594,18 @@ void Session::exec()
|
|||||||
Q_ASSERT(m_Computer->currentGameId == 0 ||
|
Q_ASSERT(m_Computer->currentGameId == 0 ||
|
||||||
m_Computer->currentGameId == m_App.id);
|
m_Computer->currentGameId == m_App.id);
|
||||||
|
|
||||||
|
bool enableGameOptimizations = false;
|
||||||
|
for (const NvDisplayMode &mode : m_Computer->displayModes) {
|
||||||
|
if (mode.width == m_StreamConfig.width &&
|
||||||
|
mode.height == m_StreamConfig.height) {
|
||||||
|
SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION,
|
||||||
|
"Found host supported resolution: %dx%d",
|
||||||
|
mode.width, mode.height);
|
||||||
|
enableGameOptimizations = prefs.gameOptimizations;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
NvHTTP http(m_Computer->activeAddress);
|
NvHTTP http(m_Computer->activeAddress);
|
||||||
if (m_Computer->currentGameId != 0) {
|
if (m_Computer->currentGameId != 0) {
|
||||||
@@ -601,7 +613,7 @@ void Session::exec()
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
http.launchApp(m_App.id, &m_StreamConfig,
|
http.launchApp(m_App.id, &m_StreamConfig,
|
||||||
prefs.gameOptimizations,
|
enableGameOptimizations,
|
||||||
prefs.playAudioOnHost,
|
prefs.playAudioOnHost,
|
||||||
inputHandler.getAttachedGamepadMask());
|
inputHandler.getAttachedGamepadMask());
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user