diff options
| author | Ac_K <Acoustik666@gmail.com> | 2020-12-16 03:19:07 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-12-15 23:19:07 -0300 |
| commit | 11222516c4b5042cd8da6fdd72f53ee736139b66 (patch) | |
| tree | a58a7870dbe3ac59a2b7fc4229dc507a753adbea /Ryujinx.HLE/HOS | |
| parent | 808380690c684a7598efad791f560e02ce70bc82 (diff) | |
gui/gpu: Implement setting and toggle for Aspect Ratio (#1777)
* gui/gpu: Implement setting and toggle for Aspect Ratio
* address gdkchan feedback and add 16:10
* fix config.json file
* Fix rebase
* Address gdkchan feedback
* Address rip feedback
* Fix aspectWidth
Diffstat (limited to 'Ryujinx.HLE/HOS')
| -rw-r--r-- | Ryujinx.HLE/HOS/Services/SurfaceFlinger/SurfaceFlinger.cs | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/Ryujinx.HLE/HOS/Services/SurfaceFlinger/SurfaceFlinger.cs b/Ryujinx.HLE/HOS/Services/SurfaceFlinger/SurfaceFlinger.cs index 4927b40e..bdffb499 100644 --- a/Ryujinx.HLE/HOS/Services/SurfaceFlinger/SurfaceFlinger.cs +++ b/Ryujinx.HLE/HOS/Services/SurfaceFlinger/SurfaceFlinger.cs @@ -1,4 +1,6 @@ -using Ryujinx.Common.Logging; +using Ryujinx.Common.Configuration; +using Ryujinx.Common.Logging; +using Ryujinx.Configuration; using Ryujinx.Graphics.GAL; using Ryujinx.Graphics.Gpu; using Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvMap; @@ -277,13 +279,19 @@ namespace Ryujinx.HLE.HOS.Services.SurfaceFlinger bool flipX = item.Transform.HasFlag(NativeWindowTransform.FlipX); bool flipY = item.Transform.HasFlag(NativeWindowTransform.FlipY); + AspectRatio aspectRatio = ConfigurationState.Instance.Graphics.AspectRatio.Value; + bool isStretched = aspectRatio == AspectRatio.Stretched; + ImageCrop crop = new ImageCrop( cropRect.Left, cropRect.Right, cropRect.Top, cropRect.Bottom, flipX, - flipY); + flipY, + isStretched, + aspectRatio.ToFloatX(), + aspectRatio.ToFloatY()); TextureCallbackInformation textureCallbackInformation = new TextureCallbackInformation { |
