[client] fix output offset when aspect ratio changes

This commit is contained in:
Geoffrey McRae 2017-12-01 13:58:29 +11:00
parent 8fdb86ae28
commit 695a7b183f

View File

@ -108,11 +108,13 @@ inline void updatePositionInfo()
state.dstRect.w = (float)h / srcAspect; state.dstRect.w = (float)h / srcAspect;
state.dstRect.h = h; state.dstRect.h = h;
state.dstRect.x = (w >> 1) - (state.dstRect.w >> 1); state.dstRect.x = (w >> 1) - (state.dstRect.w >> 1);
state.dstRect.y = 0;
} }
else else
{ {
state.dstRect.w = w; state.dstRect.w = w;
state.dstRect.h = (float)w * srcAspect; state.dstRect.h = (float)w * srcAspect;
state.dstRect.x = 0;
state.dstRect.y = (h >> 1) - (state.dstRect.h >> 1); state.dstRect.y = (h >> 1) - (state.dstRect.h >> 1);
} }
} }