N64: When disposing of the core repeatedly send the stop command, because for some reason sometimes sending it just once doesn't work

This commit is contained in:
pjgat09 2013-05-09 01:05:42 +00:00
parent 89f61e6daa
commit 0d4ed449e1
1 changed files with 5 additions and 3 deletions

View File

@ -712,9 +712,11 @@ namespace BizHawk.Emulation.Consoles.Nintendo.N64
if (!disposed)
{
// Stop the core, and wait for it to end
m64pCoreDoCommandPtr(m64p_command.M64CMD_STOP, 0, IntPtr.Zero);
//m64pEmulator.Join();
while (emulator_running) { }
while (emulator_running)
{
// Repeatedly send the stop command, because sometimes sending it just once doesn't work
m64pCoreDoCommandPtr(m64p_command.M64CMD_STOP, 0, IntPtr.Zero);
}
// Backup the saveram in case bizhawk wants to get at is after we've freed the libraries
saveram_backup = SaveSaveram();