Fix Vi managed and stray layers open/close/destroy (#3438)

* Fix Vi managed and stray layers open/close/destroy

* OpenLayer should set the state to ManagedOpened
This commit is contained in:
gdkchan 2022-07-06 13:37:36 -03:00 committed by GitHub
parent f7ef6364b7
commit 55e97959b9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 137 additions and 52 deletions

View file

@ -35,7 +35,7 @@ namespace Ryujinx.HLE.HOS.Services.Vi.RootService.ApplicationDisplayService
ulong pid = context.Device.System.AppletState.AppletResourceUserIds.GetData<ulong>((int)appletResourceUserId);
context.Device.System.SurfaceFlinger.CreateLayer(pid, out long layerId);
context.Device.System.SurfaceFlinger.CreateLayer(out long layerId, pid);
context.Device.System.SurfaceFlinger.SetRenderLayer(layerId);
context.ResponseData.Write(layerId);
@ -49,9 +49,7 @@ namespace Ryujinx.HLE.HOS.Services.Vi.RootService.ApplicationDisplayService
{
long layerId = context.RequestData.ReadInt64();
context.Device.System.SurfaceFlinger.CloseLayer(layerId);
return ResultCode.Success;
return context.Device.System.SurfaceFlinger.DestroyManagedLayer(layerId);
}
[CommandHipc(2012)] // 7.0.0+