diff options
| author | Mary <me@thog.eu> | 2021-04-13 02:56:16 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-04-13 02:56:16 +0200 |
| commit | 73881fad1995e079eae3e728cb2f4c657886e476 (patch) | |
| tree | 957679f0a3e2d8f4bcebb10dba298bfe4671774f /Ryujinx.HLE/HOS/Services/Vi/RootService/IApplicationDisplayService.cs | |
| parent | 5cb83293bc25fa707a33e7fca23bf3d1f4a6db26 (diff) | |
Surface Flinger: Fix an oversight when closing a layer (#2192)
* Surface Flinger: Fix an oversight when closing a layer
As the title say.
I also took the liberty of changing the logic on how we select the
current layer being rendered to make it more explicit when opening and
creating layers.
NOTE: Found by Ac_k.
* check for RenderLayerId and not the dictionary size
This fix a possible race condition between the time you create a layer and set the one currently used for rendering
Diffstat (limited to 'Ryujinx.HLE/HOS/Services/Vi/RootService/IApplicationDisplayService.cs')
| -rw-r--r-- | Ryujinx.HLE/HOS/Services/Vi/RootService/IApplicationDisplayService.cs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Ryujinx.HLE/HOS/Services/Vi/RootService/IApplicationDisplayService.cs b/Ryujinx.HLE/HOS/Services/Vi/RootService/IApplicationDisplayService.cs index b521ae92..1620ef21 100644 --- a/Ryujinx.HLE/HOS/Services/Vi/RootService/IApplicationDisplayService.cs +++ b/Ryujinx.HLE/HOS/Services/Vi/RootService/IApplicationDisplayService.cs @@ -126,6 +126,8 @@ namespace Ryujinx.HLE.HOS.Services.Vi.RootService IBinder producer = context.Device.System.SurfaceFlinger.OpenLayer(context.Request.HandleDesc.PId, layerId); + context.Device.System.SurfaceFlinger.SetRenderLayer(layerId); + Parcel parcel = new Parcel(0x28, 0x4); parcel.WriteObject(producer, "dispdrv\0"); @@ -164,6 +166,8 @@ namespace Ryujinx.HLE.HOS.Services.Vi.RootService IBinder producer = context.Device.System.SurfaceFlinger.CreateLayer(0, out long layerId); + context.Device.System.SurfaceFlinger.SetRenderLayer(layerId); + Parcel parcel = new Parcel(0x28, 0x4); parcel.WriteObject(producer, "dispdrv\0"); |
