mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2025-02-22 17:10:19 +00:00
Allow custom aspect ratio on Vulkan
This commit is contained in:
parent
7347642c05
commit
f1a1f477ef
1 changed files with 2 additions and 2 deletions
|
@ -293,8 +293,8 @@ namespace Ryujinx.Graphics.Vulkan
|
||||||
ScreenCaptureRequested = false;
|
ScreenCaptureRequested = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
float ratioX = MathF.Min(1f, (_height * (float)SurfaceWidth) / ((float)SurfaceHeight * _width));
|
float ratioX = crop.IsStretched ? 1.0f : MathF.Min(1.0f, _height * crop.AspectRatioX / (_width * crop.AspectRatioY));
|
||||||
float ratioY = MathF.Min(1f, (_width * (float)SurfaceHeight) / ((float)SurfaceWidth * _height));
|
float ratioY = crop.IsStretched ? 1.0f : MathF.Min(1.0f, _width * crop.AspectRatioY / (_height * crop.AspectRatioX));
|
||||||
|
|
||||||
int dstWidth = (int)(_width * ratioX);
|
int dstWidth = (int)(_width * ratioX);
|
||||||
int dstHeight = (int)(_height * ratioY);
|
int dstHeight = (int)(_height * ratioY);
|
||||||
|
|
Loading…
Reference in a new issue