Improve a crash in disassembly on game shutdown.
This commit is contained in:
parent
9581de449a
commit
aa28c0f40d
1 changed files with 7 additions and 3 deletions
|
@ -315,9 +315,10 @@ void System_Wake() {
|
|||
|
||||
static bool pspIsInited = false;
|
||||
static bool pspIsIniting = false;
|
||||
static bool pspIsQuiting = false;
|
||||
|
||||
bool PSP_InitStart(const CoreParameter &coreParam, std::string *error_string) {
|
||||
if (pspIsIniting) {
|
||||
if (pspIsIniting || pspIsQuiting) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -394,12 +395,12 @@ bool PSP_IsIniting() {
|
|||
}
|
||||
|
||||
bool PSP_IsInited() {
|
||||
return pspIsInited;
|
||||
return pspIsInited && !pspIsQuiting;
|
||||
}
|
||||
|
||||
void PSP_Shutdown() {
|
||||
// Do nothing if we never inited.
|
||||
if (!pspIsInited && !pspIsIniting) {
|
||||
if (!pspIsInited && !pspIsIniting && !pspIsQuiting) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -409,6 +410,8 @@ void PSP_Shutdown() {
|
|||
}
|
||||
#endif
|
||||
|
||||
// Make sure things know right away that PSP memory, etc. is going away.
|
||||
pspIsQuiting = true;
|
||||
if (coreState == CORE_RUNNING)
|
||||
Core_UpdateState(CORE_ERROR);
|
||||
Core_NotifyShutdown();
|
||||
|
@ -426,6 +429,7 @@ void PSP_Shutdown() {
|
|||
currentMIPS = 0;
|
||||
pspIsInited = false;
|
||||
pspIsIniting = false;
|
||||
pspIsQuiting = false;
|
||||
}
|
||||
|
||||
void PSP_RunLoopUntil(u64 globalticks) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue