From 514a8575a26b8659d2a66c24e26b82227c5beb16 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Thu, 7 May 2020 18:56:53 -0700 Subject: [PATCH] Use the viewport size for computing the overlay position --- app/streaming/video/ffmpeg-renderers/sdlvid.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/streaming/video/ffmpeg-renderers/sdlvid.cpp b/app/streaming/video/ffmpeg-renderers/sdlvid.cpp index 340f87f5..5bb0efc9 100644 --- a/app/streaming/video/ffmpeg-renderers/sdlvid.cpp +++ b/app/streaming/video/ffmpeg-renderers/sdlvid.cpp @@ -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