mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2025-07-03 08:15:37 +00:00
Use the viewport size for computing the overlay position
This commit is contained in:
parent
fc11377552
commit
514a8575a2
@ -221,10 +221,10 @@ void SdlRenderer::renderOverlay(Overlay::OverlayType type)
|
|||||||
|
|
||||||
if (type == Overlay::OverlayStatusUpdate) {
|
if (type == Overlay::OverlayStatusUpdate) {
|
||||||
// Bottom Left
|
// Bottom Left
|
||||||
int unused;
|
SDL_Rect viewportRect;
|
||||||
SDL_RenderGetLogicalSize(m_Renderer, &unused, &m_OverlayRects[type].y);
|
SDL_RenderGetViewport(m_Renderer, &viewportRect);
|
||||||
m_OverlayRects[type].x = 0;
|
m_OverlayRects[type].x = 0;
|
||||||
m_OverlayRects[type].y -= surface->h;
|
m_OverlayRects[type].y = viewportRect.h - surface->h;
|
||||||
}
|
}
|
||||||
else if (type == Overlay::OverlayDebug) {
|
else if (type == Overlay::OverlayDebug) {
|
||||||
// Top left
|
// Top left
|
||||||
|
Loading…
x
Reference in New Issue
Block a user