Преглед изворни кода

Swap BGR565 components by changing the format (#2577)

gdkchan пре 4 година
родитељ
комит
5b8ceb9173
1 измењених фајлова са 12 додато и 1 уклоњено
  1. 12 1
      Ryujinx.Graphics.OpenGL/Image/TextureView.cs

+ 12 - 1
Ryujinx.Graphics.OpenGL/Image/TextureView.cs

@@ -204,7 +204,18 @@ namespace Ryujinx.Graphics.OpenGL.Image
 
 
             if (forceBgra)
             if (forceBgra)
             {
             {
-                pixelFormat = PixelFormat.Bgra;
+                if (pixelType == PixelType.UnsignedShort565)
+                {
+                    pixelType = PixelType.UnsignedShort565Reversed;
+                }
+                else if (pixelType == PixelType.UnsignedShort565Reversed)
+                {
+                    pixelType = PixelType.UnsignedShort565;
+                }
+                else
+                {
+                    pixelFormat = PixelFormat.Bgra;
+                }
             }
             }
 
 
             int faces = 1;
             int faces = 1;