diff options
author | gdkchan <gab.dark.100@gmail.com> | 2021-08-20 18:26:25 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-20 18:26:25 -0300 |
commit | c702943af3c7e9396b8fa86e3c1be3cb9339addc (patch) | |
tree | 972faf72edd4af3d18b90c30d2d8c2b2bdf49e59 /Ryujinx.Graphics.OpenGL/Window.cs | |
parent | 6c76bc3bc0ecd1d3a86cf4e8c396c71370274ba1 (diff) |
Swap BGR components for 16-bit BGR texture formats (#2567)
Diffstat (limited to 'Ryujinx.Graphics.OpenGL/Window.cs')
-rw-r--r-- | Ryujinx.Graphics.OpenGL/Window.cs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Ryujinx.Graphics.OpenGL/Window.cs b/Ryujinx.Graphics.OpenGL/Window.cs index 35b04d6d..b80348cd 100644 --- a/Ryujinx.Graphics.OpenGL/Window.cs +++ b/Ryujinx.Graphics.OpenGL/Window.cs @@ -45,7 +45,7 @@ namespace Ryujinx.Graphics.OpenGL GL.BindFramebuffer(FramebufferTarget.DrawFramebuffer, drawFramebuffer); GL.BindFramebuffer(FramebufferTarget.ReadFramebuffer, readFramebuffer); - TextureView viewConverted = view.Format.IsBgra8() ? _renderer.TextureCopy.BgraSwap(view) : view; + TextureView viewConverted = view.Format.IsBgr() ? _renderer.TextureCopy.BgraSwap(view) : view; GL.FramebufferTexture( FramebufferTarget.ReadFramebuffer, @@ -110,7 +110,7 @@ namespace Ryujinx.Graphics.OpenGL if (ScreenCaptureRequested) { - CaptureFrame(srcX0, srcY0, srcX1, srcY1, view.Format.IsBgra8(), crop.FlipX, crop.FlipY); + CaptureFrame(srcX0, srcY0, srcX1, srcY1, view.Format.IsBgr(), crop.FlipX, crop.FlipY); ScreenCaptureRequested = false; } @@ -174,7 +174,7 @@ namespace Ryujinx.Graphics.OpenGL byte[] bitmap = new byte[size]; GL.ReadPixels(x, y, width, height, isBgra ? PixelFormat.Bgra : PixelFormat.Rgba, PixelType.UnsignedByte, bitmap); - + _renderer.OnScreenCaptured(new ScreenCaptureImageInfo(width, height, isBgra, bitmap, flipX, flipY)); } |