Просмотр исходного кода

Swap BGR565 components by changing the format (#2577)

gdkchan 4 лет назад
Родитель
Сommit
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;