mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2026-05-30 00:49:16 +00:00
@@ -189,7 +189,7 @@ namespace Ryujinx.HLE.HOS.Services.SurfaceFlinger
|
||||
return Vi.ResultCode.InvalidValue;
|
||||
}
|
||||
|
||||
if (layer.State != LayerState.ManagedClosed && layer.State != LayerState.ManagedOpened)
|
||||
if (layer.State is not LayerState.ManagedClosed and not LayerState.ManagedOpened)
|
||||
{
|
||||
Logger.Error?.Print(LogClass.SurfaceFlinger, $"Failed to destroy managed layer {layerId} (permission denied)");
|
||||
|
||||
@@ -393,7 +393,7 @@ namespace Ryujinx.HLE.HOS.Services.SurfaceFlinger
|
||||
|
||||
PostFrameBuffer(layer, item);
|
||||
}
|
||||
else if (acquireStatus != Status.NoBufferAvailaible && acquireStatus != Status.InvalidOperation)
|
||||
else if (acquireStatus is not Status.NoBufferAvailaible and not Status.InvalidOperation)
|
||||
{
|
||||
throw new InvalidOperationException();
|
||||
}
|
||||
@@ -421,8 +421,8 @@ namespace Ryujinx.HLE.HOS.Services.SurfaceFlinger
|
||||
Format format = ConvertColorFormat(item.GraphicBuffer.Object.Buffer.Surfaces[0].ColorFormat);
|
||||
|
||||
byte bytesPerPixel =
|
||||
format == Format.B5G6R5Unorm ||
|
||||
format == Format.R4G4B4A4Unorm ? (byte)2 : (byte)4;
|
||||
format is Format.B5G6R5Unorm or
|
||||
Format.R4G4B4A4Unorm ? (byte)2 : (byte)4;
|
||||
|
||||
int gobBlocksInY = 1 << item.GraphicBuffer.Object.Buffer.Surfaces[0].BlockHeightLog2;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user