UI: Prevent rendering during reboot.

Can sometimes crash.
This commit is contained in:
Unknown W. Brackets 2022-10-02 07:25:15 -07:00
parent d3f6b9b7e4
commit a8c12385c1

View file

@ -224,6 +224,15 @@ bool EmuScreen::bootAllowStorage(const Path &filename) {
}
void EmuScreen::bootGame(const Path &filename) {
if (PSP_IsRebooting())
return;
if (PSP_IsInited()) {
bootPending_ = false;
invalid_ = false;
bootComplete();
return;
}
if (PSP_IsIniting()) {
std::string error_string;
bootPending_ = !PSP_InitUpdate(&error_string);
@ -1097,6 +1106,11 @@ void EmuScreen::update() {
}
void EmuScreen::checkPowerDown() {
if (PSP_IsRebooting()) {
bootPending_ = true;
invalid_ = true;
}
if (coreState == CORE_POWERDOWN && !PSP_IsIniting() && !PSP_IsRebooting()) {
if (PSP_IsInited()) {
PSP_Shutdown();