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) {
|
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…
Add table
Add a link
Reference in a new issue