mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-11 05:26:24 +02:00
Mostly remove coreState management from System.cpp
This commit is contained in:
1 parent
58efe00b74
commit
24b30cc709
6 files changed
+31
-32
No files matched your search
+2
-30
@@ -436,7 +436,6 @@ static bool CPU_Init(FileLoader *fileLoader, IdentifiedFileType type, std::strin
|
||||
|
||||
default:
|
||||
GetBootError(type, errorString);
|
||||
coreState = CORE_BOOT_ERROR;
|
||||
g_CoreParameter.fileToStart.clear();
|
||||
return false;
|
||||
}
|
||||
@@ -514,8 +513,6 @@ bool PSP_InitStart(const CoreParameter &coreParam) {
|
||||
return false;
|
||||
}
|
||||
|
||||
coreState = CORE_POWERUP;
|
||||
|
||||
g_bootState = BootState::Booting;
|
||||
|
||||
GraphicsContext *temp = g_CoreParameter.graphicsContext;
|
||||
@@ -569,7 +566,6 @@ bool PSP_InitStart(const CoreParameter &coreParam) {
|
||||
// it gets written to from the loader thread that gets spawned.
|
||||
if (!CPU_Init(loadedFile, type, &g_CoreParameter.errorString)) {
|
||||
CPU_Shutdown(false);
|
||||
coreState = CORE_BOOT_ERROR;
|
||||
g_CoreParameter.fileToStart.clear();
|
||||
*error_string = g_CoreParameter.errorString;
|
||||
if (error_string->empty()) {
|
||||
@@ -579,13 +575,6 @@ bool PSP_InitStart(const CoreParameter &coreParam) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (PSP_CoreParameter().startBreak) {
|
||||
coreState = CORE_STEPPING_CPU;
|
||||
System_Notify(SystemNotification::DEBUG_MODE_CHANGE);
|
||||
} else {
|
||||
coreState = CORE_RUNNING_CPU;
|
||||
}
|
||||
|
||||
g_bootState = BootState::Complete;
|
||||
});
|
||||
|
||||
@@ -594,7 +583,7 @@ bool PSP_InitStart(const CoreParameter &coreParam) {
|
||||
|
||||
BootState PSP_InitUpdate(std::string *error_string) {
|
||||
if (g_bootState == BootState::Booting || g_bootState == BootState::Off) {
|
||||
// We're done already.
|
||||
// Nothing to do right now.
|
||||
return g_bootState;
|
||||
}
|
||||
|
||||
@@ -612,7 +601,6 @@ BootState PSP_InitUpdate(std::string *error_string) {
|
||||
}
|
||||
|
||||
// Ok, async boot completed, let's finish up things on the main thread.
|
||||
|
||||
if (!gpu) { // should be!
|
||||
INFO_LOG(Log::System, "Starting graphics...");
|
||||
Draw::DrawContext *draw = g_CoreParameter.graphicsContext ? g_CoreParameter.graphicsContext->GetDrawContext() : nullptr;
|
||||
@@ -664,8 +652,7 @@ void PSP_Shutdown(bool success) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (coreState == CORE_RUNNING_CPU)
|
||||
Core_Stop();
|
||||
Core_Stop();
|
||||
|
||||
if (g_Config.bFuncHashMap) {
|
||||
MIPSAnalyst::StoreHashMap();
|
||||
@@ -836,21 +823,6 @@ bool CreateSysDirectories() {
|
||||
return true;
|
||||
}
|
||||
|
||||
const char *CoreStateToString(CoreState state) {
|
||||
switch (state) {
|
||||
case CORE_RUNNING_CPU: return "RUNNING_CPU";
|
||||
case CORE_NEXTFRAME: return "NEXTFRAME";
|
||||
case CORE_STEPPING_CPU: return "STEPPING_CPU";
|
||||
case CORE_POWERUP: return "POWERUP";
|
||||
case CORE_POWERDOWN: return "POWERDOWN";
|
||||
case CORE_BOOT_ERROR: return "BOOT_ERROR";
|
||||
case CORE_RUNTIME_ERROR: return "RUNTIME_ERROR";
|
||||
case CORE_STEPPING_GE: return "STEPPING_GE";
|
||||
case CORE_RUNNING_GE: return "RUNNING_GE";
|
||||
default: return "N/A";
|
||||
}
|
||||
}
|
||||
|
||||
const char *DumpFileTypeToString(DumpFileType type) {
|
||||
switch (type) {
|
||||
case DumpFileType::EBOOT: return "EBOOT";
|
||||
|
||||
Reference in new issue
Block a user