diff options
author | gdkchan <gab.dark.100@gmail.com> | 2022-10-02 18:50:03 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-02 21:50:03 +0000 |
commit | 81f848e54f4c66af82297b4c9d26cacf79ec10be (patch) | |
tree | a27463ff1dbb2f2208e1c4b1182ba5cc4aacc695 /Ryujinx.Graphics.Gpu/Window.cs | |
parent | 358a7816393fab8c2c323f718c18d3610e91e681 (diff) |
Allow Surface Flinger frame enqueue after process has exited (#3733)1.1.288
Diffstat (limited to 'Ryujinx.Graphics.Gpu/Window.cs')
-rw-r--r-- | Ryujinx.Graphics.Gpu/Window.cs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Ryujinx.Graphics.Gpu/Window.cs b/Ryujinx.Graphics.Gpu/Window.cs index 8ad70c7f..18320c74 100644 --- a/Ryujinx.Graphics.Gpu/Window.cs +++ b/Ryujinx.Graphics.Gpu/Window.cs @@ -123,7 +123,8 @@ namespace Ryujinx.Graphics.Gpu /// <param name="releaseCallback">Texture release callback</param> /// <param name="userObj">User defined object passed to the release callback</param> /// <exception cref="ArgumentException">Thrown when <paramref name="pid"/> is invalid</exception> - public void EnqueueFrameThreadSafe( + /// <returns>True if the frame was added to the queue, false otherwise</returns> + public bool EnqueueFrameThreadSafe( ulong pid, ulong address, int width, @@ -140,7 +141,7 @@ namespace Ryujinx.Graphics.Gpu { if (!_context.PhysicalMemoryRegistry.TryGetValue(pid, out var physicalMemory)) { - throw new ArgumentException("The PID is invalid or the process was not registered", nameof(pid)); + return false; } FormatInfo formatInfo = new FormatInfo(format, 1, 1, bytesPerPixel, 4); @@ -184,6 +185,8 @@ namespace Ryujinx.Graphics.Gpu acquireCallback, releaseCallback, userObj)); + + return true; } /// <summary> |