mirror of
https://github.com/moonlight-stream/moonlight-qt
synced 2024-11-15 07:57:19 +00:00
Use the viewport size for computing the overlay position
This commit is contained in:
parent
fc11377552
commit
514a8575a2
1 changed files with 3 additions and 3 deletions
|
@ -221,10 +221,10 @@ void SdlRenderer::renderOverlay(Overlay::OverlayType type)
|
|||
|
||||
if (type == Overlay::OverlayStatusUpdate) {
|
||||
// Bottom Left
|
||||
int unused;
|
||||
SDL_RenderGetLogicalSize(m_Renderer, &unused, &m_OverlayRects[type].y);
|
||||
SDL_Rect viewportRect;
|
||||
SDL_RenderGetViewport(m_Renderer, &viewportRect);
|
||||
m_OverlayRects[type].x = 0;
|
||||
m_OverlayRects[type].y -= surface->h;
|
||||
m_OverlayRects[type].y = viewportRect.h - surface->h;
|
||||
}
|
||||
else if (type == Overlay::OverlayDebug) {
|
||||
// Top left
|
||||
|
|
Loading…
Reference in a new issue