Skip to content

Commit

Permalink
Merge pull request #18644 from hrydgard/fix-scekernelexit
Browse files Browse the repository at this point in the history
Fix sceKernelExitGame (regressed with the run-in-background stuff)
  • Loading branch information
hrydgard committed Dec 30, 2023
2 parents b0c0a0f + 4e90d82 commit 305b0bb
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion UI/EmuScreen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1535,7 +1535,9 @@ ScreenRenderFlags EmuScreen::render(ScreenRenderMode mode) {

// It's possible this might be set outside PSP_RunLoopFor().
// In this case, we need to double check it here.
checkPowerDown();
if (mode & ScreenRenderMode::TOP) {
checkPowerDown();
}
draw->BindFramebufferAsRenderTarget(nullptr, { RPAction::CLEAR, RPAction::CLEAR, RPAction::CLEAR }, "EmuScreen_Invalid");
draw->SetViewport(viewport);
draw->SetScissorRect(0, 0, g_display.pixel_xres, g_display.pixel_yres);
Expand Down Expand Up @@ -1622,6 +1624,9 @@ ScreenRenderFlags EmuScreen::render(ScreenRenderMode mode) {
return flags;
}

// NOTE: We don't check for powerdown if we're not the top screen.
checkPowerDown();

if (hasVisibleUI()) {
// In most cases, this should already be bound and a no-op.
draw->BindFramebufferAsRenderTarget(nullptr, { RPAction::KEEP, RPAction::DONT_CARE, RPAction::DONT_CARE }, "EmuScreen_UI");
Expand Down

0 comments on commit 305b0bb

Please sign in to comment.