mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-22 05:27:20 +00:00
[client] fix output offset when aspect ratio changes
This commit is contained in:
parent
8fdb86ae28
commit
695a7b183f
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user