Skip to content

Commit

Permalink
Merge pull request #16146 from unknownbrackets/debugger
Browse files Browse the repository at this point in the history
UI: Prevent rendering during reboot
  • Loading branch information
hrydgard authored Oct 2, 2022
2 parents d3f6b9b + a8c1238 commit 33f24ef
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions UI/EmuScreen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit 33f24ef

Please sign in to comment.