mirror of
https://git.ryujinx.app/projects/Kenji-NX.git
synced 2026-10-07 17:21:06 +02:00
misc: chore: Merge into pattern
This commit is contained in:
@@ -336,7 +336,7 @@ namespace Ryujinx.HLE.HOS.Services.SurfaceFlinger
|
||||
|
||||
public Status SetMaxAcquiredBufferCount(int maxAcquiredBufferCount)
|
||||
{
|
||||
if (maxAcquiredBufferCount < 0 || maxAcquiredBufferCount > BufferSlotArray.MaxAcquiredBuffers)
|
||||
if (maxAcquiredBufferCount is < 0 or > BufferSlotArray.MaxAcquiredBuffers)
|
||||
{
|
||||
return Status.BadValue;
|
||||
}
|
||||
|
||||
@@ -126,7 +126,7 @@ namespace Ryujinx.HLE.HOS.Services.SurfaceFlinger
|
||||
{
|
||||
BufferState state = Slots[slot].BufferState;
|
||||
|
||||
if (state == BufferState.Queued || state == BufferState.Dequeued)
|
||||
if (state is BufferState.Queued or BufferState.Dequeued)
|
||||
{
|
||||
maxBufferCount = slot + 1;
|
||||
}
|
||||
|
||||
@@ -421,8 +421,7 @@ 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