Procházet zdrojové kódy

android-fence: call callback when fence is invalid (#1881)

Bruno Macabeus před 5 roky
rodič
revize
996e6905ba

+ 8 - 1
Ryujinx.HLE/HOS/Services/SurfaceFlinger/Types/AndroidFence.cs

@@ -70,7 +70,14 @@ namespace Ryujinx.HLE.HOS.Services.SurfaceFlinger
         {
         {
             ref NvFence fence = ref NvFences[FenceCount - 1];
             ref NvFence fence = ref NvFences[FenceCount - 1];
 
 
-            gpuContext.Synchronization.RegisterCallbackOnSyncpoint(fence.Id, fence.Value, callback);
+            if (fence.IsValid())
+            {
+                gpuContext.Synchronization.RegisterCallbackOnSyncpoint(fence.Id, fence.Value, callback);
+            }
+            else
+            {
+                callback();
+            }
         }
         }
 
 
         public uint GetFlattenedSize()
         public uint GetFlattenedSize()