Fix FMV aspect ratio.
This commit is contained in:
@@ -74,7 +74,7 @@ namespace OpenRA.Mods.Common.Widgets
|
|||||||
video.Height),
|
video.Height),
|
||||||
TextureChannel.RGBA);
|
TextureChannel.RGBA);
|
||||||
|
|
||||||
var scale = Math.Min((float)RenderBounds.Width / video.Width, (float)RenderBounds.Height / video.Height * AspectRatio);
|
var scale = Math.Min((float)RenderBounds.Width / video.Width, RenderBounds.Height / (video.Height * AspectRatio));
|
||||||
videoOrigin = new float2(
|
videoOrigin = new float2(
|
||||||
RenderBounds.X + (RenderBounds.Width - scale * video.Width) / 2,
|
RenderBounds.X + (RenderBounds.Width - scale * video.Width) / 2,
|
||||||
RenderBounds.Y + (RenderBounds.Height - scale * video.Height * AspectRatio) / 2);
|
RenderBounds.Y + (RenderBounds.Height - scale * video.Height * AspectRatio) / 2);
|
||||||
|
|||||||
Reference in New Issue
Block a user