mirror of https://github.com/PCSX2/pcsx2.git
VMManager: Exit the CPU rec immediately on stopping
This commit is contained in:
parent
ed26368a3a
commit
c596a51593
|
@ -209,6 +209,11 @@ void VMManager::SetState(VMState state)
|
|||
else
|
||||
Host::OnVMResumed();
|
||||
}
|
||||
else if (state == VMState::Stopping)
|
||||
{
|
||||
// If stopping, break execution as soon as possible.
|
||||
Cpu->ExitExecution();
|
||||
}
|
||||
}
|
||||
|
||||
bool VMManager::HasValidVM()
|
||||
|
|
|
@ -686,7 +686,19 @@ static void recSafeExitExecution()
|
|||
|
||||
// Force an event test at the end of this block.
|
||||
if (!eeEventTestIsActive)
|
||||
{
|
||||
// EE is running.
|
||||
cpuRegs.nextEventCycle = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
// IOP might be running, so break out if so.
|
||||
if (psxRegs.iopCycleEE > 0)
|
||||
{
|
||||
psxRegs.iopBreak += psxRegs.iopCycleEE; // record the number of cycles the IOP didn't run.
|
||||
psxRegs.iopCycleEE = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void recResetEE()
|
||||
|
|
Loading…
Reference in New Issue