mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-06-15 21:22:40 +00:00
Use per-display undefined window positions
This commit is contained in:
@@ -432,7 +432,7 @@ void Session::getWindowDimensions(bool fullScreen,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Full-screen modes always start at the origin
|
// Full-screen modes always start at the origin
|
||||||
x = y = SDL_WINDOWPOS_UNDEFINED;
|
x = y = SDL_WINDOWPOS_UNDEFINED_DISPLAY(displayIndex);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
SDL_Rect usableBounds;
|
SDL_Rect usableBounds;
|
||||||
@@ -465,7 +465,7 @@ void Session::getWindowDimensions(bool fullScreen,
|
|||||||
|
|
||||||
width = m_StreamConfig.width;
|
width = m_StreamConfig.width;
|
||||||
height = m_StreamConfig.height;
|
height = m_StreamConfig.height;
|
||||||
x = y = SDL_WINDOWPOS_UNDEFINED;
|
x = y = SDL_WINDOWPOS_UNDEFINED_DISPLAY(displayIndex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -484,9 +484,7 @@ void Session::toggleFullscreen()
|
|||||||
|
|
||||||
getWindowDimensions(fullScreen, x, y, width, height);
|
getWindowDimensions(fullScreen, x, y, width, height);
|
||||||
|
|
||||||
if (x != SDL_WINDOWPOS_UNDEFINED || y != SDL_WINDOWPOS_UNDEFINED) {
|
SDL_SetWindowPosition(m_Window, x, y);
|
||||||
SDL_SetWindowPosition(m_Window, x, y);
|
|
||||||
}
|
|
||||||
SDL_SetWindowSize(m_Window, width, height);
|
SDL_SetWindowSize(m_Window, width, height);
|
||||||
|
|
||||||
if (fullScreen) {
|
if (fullScreen) {
|
||||||
|
|||||||
Reference in New Issue
Block a user