mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-06-18 14:40:56 +00:00
Use the viewport size for computing the overlay position
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user