Process savestates during single stepping.

This way we can handle them on the same thread, without weird delays.
This commit is contained in:
Unknown W. Brackets 2013-09-14 18:43:23 -07:00
parent 2d084ec747
commit 2ac5bcff1f
4 changed files with 34 additions and 22 deletions

View file

@ -252,6 +252,7 @@ void Core_UpdateState(CoreState newState) {
if ((coreState == CORE_RUNNING || coreState == CORE_NEXTFRAME) && newState != CORE_RUNNING)
coreStatePending = true;
coreState = newState;
Core_UpdateSingleStep();
}
bool PSP_Init(const CoreParameter &coreParam, std::string *error_string) {
@ -286,7 +287,7 @@ bool PSP_IsInited() {
void PSP_Shutdown() {
if (coreState == CORE_RUNNING)
coreState = CORE_ERROR;
Core_UpdateState(CORE_ERROR);
if (cpuThread != NULL) {
CPU_SetState(CPU_THREAD_SHUTDOWN);
CPU_WaitStatus(&CPU_IsShutdown);