[client] fix output offset when aspect ratio changes

This commit is contained in:
Geoffrey McRae committed 2017-12-12 03:59:56 +11:00
1 parent 8fdb86ae28
commit 695a7b183f
1 file changed
+2
+2
View File
@@ -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);
}
}