mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-06-17 06:01:12 +00:00
Avoid modesetting if the display didn't change
This commit is contained in:
@@ -1662,8 +1662,11 @@ void Session::execInternal()
|
|||||||
flushWindowEvents();
|
flushWindowEvents();
|
||||||
|
|
||||||
// Update the window display mode based on our current monitor
|
// Update the window display mode based on our current monitor
|
||||||
currentDisplayIndex = SDL_GetWindowDisplayIndex(m_Window);
|
// NB: Avoid a useless modeset by only doing this if it changed.
|
||||||
updateOptimalWindowDisplayMode();
|
if (currentDisplayIndex != SDL_GetWindowDisplayIndex(m_Window)) {
|
||||||
|
currentDisplayIndex = SDL_GetWindowDisplayIndex(m_Window);
|
||||||
|
updateOptimalWindowDisplayMode();
|
||||||
|
}
|
||||||
|
|
||||||
// Now that the old decoder is dead, flush any events it may
|
// Now that the old decoder is dead, flush any events it may
|
||||||
// have queued to reset itself (if this reset was the result
|
// have queued to reset itself (if this reset was the result
|
||||||
|
|||||||
Reference in New Issue
Block a user