From 695a7b183fa663de2357532d9e23fd61f8e4fda6 Mon Sep 17 00:00:00 2001 From: Geoffrey McRae Date: Fri, 1 Dec 2017 13:58:29 +1100 Subject: [PATCH] [client] fix output offset when aspect ratio changes --- client/main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/client/main.c b/client/main.c index d1d2535c..b3011084 100644 --- a/client/main.c +++ b/client/main.c @@ -108,11 +108,13 @@ inline void updatePositionInfo() state.dstRect.w = (float)h / srcAspect; state.dstRect.h = h; state.dstRect.x = (w >> 1) - (state.dstRect.w >> 1); + state.dstRect.y = 0; } else { state.dstRect.w = w; state.dstRect.h = (float)w * srcAspect; + state.dstRect.x = 0; state.dstRect.y = (h >> 1) - (state.dstRect.h >> 1); } }