diff options
author | Ac_K <Acoustik666@gmail.com> | 2022-11-24 15:08:27 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-24 15:08:27 +0100 |
commit | a1ddaa2736b188de928564af56aa787a25831ff7 (patch) | |
tree | 1a4bb2717d61b3d6106103f29dbc461190e53e7b /Ryujinx.Graphics.Vulkan/VulkanRenderer.cs | |
parent | 008286b79fd7a5d223ccd7bd99c86d8058e216e1 (diff) |
ui: Fixes disposing on GTK/Avalonia and Firmware Messages on Avalonia (#3885)1.1.380
* ui: Only wait on _exitEvent when MainLoop is active under GTK
This fixes a dispose issue under Horizon/GTK, we don't check if the ApplicationClient is null so it throw NCE. We don't check if the main loop is active and waiting an event which is set in the main loop... So that could lead to a freeze.
Everything works fine in GTK now.
Related issue: https://github.com/Ryujinx/Ryujinx/issues/3873
As a side note, same kind of issue appear in Avalonia UI too. Firmware's popup doesn't show anything and the emulator just freeze.
* TSRBerry's change
Co-authored-by: TSRBerry <20988865+TSRBerry@users.noreply.github.com>
* Fix Avalonia crashing/freezing
* Add Avalonia OpenGL fixes
* Fix firmware popup on windows
* Fixes everything
* Add _initialized bool to VulkanRenderer and OpenGL Window
Co-authored-by: TSRBerry <20988865+TSRBerry@users.noreply.github.com>
Diffstat (limited to 'Ryujinx.Graphics.Vulkan/VulkanRenderer.cs')
-rw-r--r-- | Ryujinx.Graphics.Vulkan/VulkanRenderer.cs | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/Ryujinx.Graphics.Vulkan/VulkanRenderer.cs b/Ryujinx.Graphics.Vulkan/VulkanRenderer.cs index 3f8ebe67..22e30329 100644 --- a/Ryujinx.Graphics.Vulkan/VulkanRenderer.cs +++ b/Ryujinx.Graphics.Vulkan/VulkanRenderer.cs @@ -22,6 +22,8 @@ namespace Ryujinx.Graphics.Vulkan private Device _device; private WindowBase _window; + private bool _initialized; + internal FormatCapabilities FormatCapabilities { get; private set; } internal HardwareCapabilities Capabilities; @@ -266,6 +268,8 @@ namespace Ryujinx.Graphics.Vulkan LoadFeatures(supportedExtensions, maxQueueCount, queueFamilyIndex); _window = new Window(this, _surface, _physicalDevice, _device); + + _initialized = true; } public BufferHandle CreateBuffer(int size) @@ -573,6 +577,11 @@ namespace Ryujinx.Graphics.Vulkan public unsafe void Dispose() { + if (!_initialized) + { + return; + } + CommandBufferPool.Dispose(); BackgroundResources.Dispose(); _counters.Dispose(); @@ -613,4 +622,4 @@ namespace Ryujinx.Graphics.Vulkan Api.DestroyInstance(_instance, null); } } -} +}
\ No newline at end of file |