mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2025-02-21 16:43:35 +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;
|
||||
}
|
||||
|
||||
float ratioX = MathF.Min(1f, (_height * (float)SurfaceWidth) / ((float)SurfaceHeight * _width));
|
||||
float ratioY = MathF.Min(1f, (_width * (float)SurfaceHeight) / ((float)SurfaceWidth * _height));
|
||||
float ratioX = crop.IsStretched ? 1.0f : MathF.Min(1.0f, _height * crop.AspectRatioX / (_width * crop.AspectRatioY));
|
||||
float ratioY = crop.IsStretched ? 1.0f : MathF.Min(1.0f, _width * crop.AspectRatioY / (_height * crop.AspectRatioX));
|
||||
|
||||
int dstWidth = (int)(_width * ratioX);
|
||||
int dstHeight = (int)(_height * ratioY);
|
||||
|
|
Loading…
Reference in a new issue