N64: Attempt to fix a threading problem

This commit is contained in:
pjgat09 2013-05-01 22:32:31 +00:00
parent 6b350e58c9
commit 08c41348e5
1 changed files with 5 additions and 1 deletions

View File

@ -106,7 +106,8 @@ namespace BizHawk.Emulation.Consoles.Nintendo.N64
{
// Stop the core, and wait for it to end
m64pCoreDoCommandPtr(m64p_command.M64CMD_STOP, 0, IntPtr.Zero);
m64pEmulator.Join();
//m64pEmulator.Join();
while (emulator_running) { }
resampler.Dispose();
resampler = null;
@ -402,9 +403,12 @@ namespace BizHawk.Emulation.Consoles.Nintendo.N64
AttachedCore = this;
}
volatile bool emulator_running = false;
public void ExecuteEmulator()
{
emulator_running = true;
m64pCoreDoCommandPtr(m64p_command.M64CMD_EXECUTE, 0, IntPtr.Zero);
emulator_running = false;
}