fix deadlocks in RAIntegration for real this time (i hate this hack)
fixes f8a5adecb5
This commit is contained in:
parent
03077daf71
commit
713944724d
|
@ -2296,6 +2296,8 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
private void CheckMessages()
|
||||
{
|
||||
using var raMemHack = (RA as RAIntegration)?.ThisIsTheRAMemHack();
|
||||
|
||||
Application.DoEvents();
|
||||
if (ActiveForm != null)
|
||||
{
|
||||
|
|
|
@ -281,5 +281,9 @@ namespace BizHawk.Client.EmuHawk
|
|||
RA.DoAchievementsFrame();
|
||||
}
|
||||
}
|
||||
|
||||
// FIXME: THIS IS GARBAGE
|
||||
public RAMemGuard.AccessWrapper? ThisIsTheRAMemHack()
|
||||
=> _memGuard.GetAccess();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,8 +21,8 @@ namespace BizHawk.Client.EmuHawk
|
|||
{
|
||||
lock (MemSync)
|
||||
{
|
||||
MemSema.Wait();
|
||||
MemLock.Wait();
|
||||
MemSema.Wait();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -37,7 +37,8 @@ namespace BizHawk.Client.EmuHawk
|
|||
MemSema.Dispose();
|
||||
}
|
||||
|
||||
public readonly ref struct AccessWrapper
|
||||
// can't be a ref struct due to ThisIsTheRAMemHack :(
|
||||
public readonly struct AccessWrapper : IDisposable
|
||||
{
|
||||
private readonly RAMemGuard _guard;
|
||||
|
||||
|
|
Loading…
Reference in New Issue