Cleanup a lot of the bootup state management.

This commit is contained in:
Henrik Rydgård
2025-03-30 14:02:29 +02:00
parent e6ea158dcc
commit 088a02bfdb
30 changed files with 239 additions and 257 deletions
+3 -8
View File
@@ -1147,15 +1147,10 @@ double g_lastSaveTime = -1.0;
}
void Cleanup() {
// TODO: Handle this better.
if (needsRestart) {
PSP_Shutdown();
std::string resetError;
if (!PSP_Init(PSP_CoreParameter(), &resetError)) {
ERROR_LOG(Log::Boot, "Error resetting: %s", resetError.c_str());
// TODO: This probably doesn't clean up well enough.
Core_Stop();
return;
}
std::string error_string;
PSP_Reboot(&error_string);
System_Notify(SystemNotification::BOOT_DONE);
System_Notify(SystemNotification::DISASSEMBLY);
needsRestart = false;