diff options
author | gdkchan <gab.dark.100@gmail.com> | 2021-08-04 15:28:33 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-04 15:28:33 -0300 |
commit | a27986c31167d8ce60efcee7e901da241f63ed08 (patch) | |
tree | ac84a8d686b82d9114a4c609ff3d0ae8cea52768 /Ryujinx.Audio.Backends.SDL2/SDL2HardwareDeviceSession.cs | |
parent | 06cd3abe6c5a8d86bf2473089c489415ce8c4573 (diff) |
Make audio disposal thread safe on all 3 backends (#2527)
* Make audio disposal thread safe on all 3 backends
* Make OpenAL more consistent with the other backends
* Remove Window.Cursor = null, and change dummy TValue to byte
Diffstat (limited to 'Ryujinx.Audio.Backends.SDL2/SDL2HardwareDeviceSession.cs')
-rw-r--r-- | Ryujinx.Audio.Backends.SDL2/SDL2HardwareDeviceSession.cs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/Ryujinx.Audio.Backends.SDL2/SDL2HardwareDeviceSession.cs b/Ryujinx.Audio.Backends.SDL2/SDL2HardwareDeviceSession.cs index 344dd9b6..ceb6e706 100644 --- a/Ryujinx.Audio.Backends.SDL2/SDL2HardwareDeviceSession.cs +++ b/Ryujinx.Audio.Backends.SDL2/SDL2HardwareDeviceSession.cs @@ -201,7 +201,7 @@ namespace Ryujinx.Audio.Backends.SDL2 protected virtual void Dispose(bool disposing) { - if (disposing) + if (disposing && _driver.Unregister(this)) { PrepareToClose(); Stop(); @@ -210,8 +210,6 @@ namespace Ryujinx.Audio.Backends.SDL2 { SDL_CloseAudioDevice(_outputStream); } - - _driver.Unregister(this); } } |