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
This commit is contained in:
gdkchan 2021-08-04 15:28:33 -03:00 committed by GitHub
parent 06cd3abe6c
commit a27986c311
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 45 additions and 115 deletions

View file

@ -190,7 +190,7 @@ namespace Ryujinx.Audio.Backends.OpenAL
protected virtual void Dispose(bool disposing)
{
if (disposing)
if (disposing && _driver.Unregister(this))
{
lock (_lock)
{
@ -198,8 +198,6 @@ namespace Ryujinx.Audio.Backends.OpenAL
Stop();
AL.DeleteSource(_sourceId);
_driver.Unregister(this);
}
}
}