SurfaceFlinger: fix some bugs (#1262)
* SurfaceFlinger: fix some bugs This fixes some bugs in the current implementation and make it closer to the real implementation. * Fix align of some variables
This commit is contained in:
parent
44d7fcff39
commit
bcb7761eac
6 changed files with 138 additions and 59 deletions
|
@ -20,7 +20,7 @@ namespace Ryujinx.HLE.HOS.Services.SurfaceFlinger
|
|||
{
|
||||
int numAcquiredBuffers = 0;
|
||||
|
||||
for (int i = 0; i < Core.Slots.Length; i++)
|
||||
for (int i = 0; i < Core.MaxBufferCountCached; i++)
|
||||
{
|
||||
if (Core.Slots[i].BufferState == BufferState.Acquired)
|
||||
{
|
||||
|
@ -28,7 +28,7 @@ namespace Ryujinx.HLE.HOS.Services.SurfaceFlinger
|
|||
}
|
||||
}
|
||||
|
||||
if (numAcquiredBuffers >= Core.MaxAcquiredBufferCount + 1)
|
||||
if (numAcquiredBuffers > Core.MaxAcquiredBufferCount)
|
||||
{
|
||||
bufferItem = null;
|
||||
|
||||
|
@ -153,6 +153,8 @@ namespace Ryujinx.HLE.HOS.Services.SurfaceFlinger
|
|||
return Status.NoMemory;
|
||||
}
|
||||
|
||||
Core.UpdateMaxBufferCountCachedLocked(freeSlot);
|
||||
|
||||
slot = freeSlot;
|
||||
|
||||
Core.Slots[slot].GraphicBuffer.Set(graphicBuffer);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue