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