Shutdown the filesystem after HLE.

This commit is contained in:
Unknown W. Brackets 2013-08-10 13:50:21 -07:00
parent 333cc33efb
commit 00ae811446

View File

@ -116,6 +116,8 @@ void CPU_WaitStatus(bool (*pred)()) {
cpuThreadLock.unlock();
}
void CPU_Shutdown();
void CPU_Init() {
currentCPU = &mipsr4k;
numCPUs = 1;
@ -157,12 +159,7 @@ void CPU_Init() {
// Why did we check for CORE_POWERDOWN here?
if (!LoadFile(filename, &coreParameter.errorString)) {
pspFileSystem.Shutdown();
CoreTiming::Shutdown();
__KernelShutdown();
HLEShutdown();
host->ShutdownSound();
Memory::Shutdown();
CPU_Shutdown();
coreParameter.fileToStart = "";
CPU_SetState(CPU_THREAD_NOT_RUNNING);
return;
@ -176,20 +173,18 @@ void CPU_Init() {
}
void CPU_Shutdown() {
pspFileSystem.Shutdown();
CoreTiming::Shutdown();
if (g_Config.bAutoSaveSymbolMap) {
host->SaveSymbolMap();
}
CoreTiming::Shutdown();
__KernelShutdown();
HLEShutdown();
if (coreParameter.enableSound) {
host->ShutdownSound();
mixer = 0; // deleted in ShutdownSound
}
__KernelShutdown();
HLEShutdown();
pspFileSystem.Shutdown();
Memory::Shutdown();
currentCPU = 0;
}