Skip to content

Commit

Permalink
More presentation fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
hrydgard committed Oct 17, 2024
1 parent 843fe22 commit 669c445
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
1 change: 1 addition & 0 deletions GPU/Software/SoftGpu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -628,6 +628,7 @@ void SoftGPU::CopyToCurrentFboFromDisplayRam(int srcwidth, int srcheight) {
}
if (!hasImage) {
draw_->BindFramebufferAsRenderTarget(nullptr, { Draw::RPAction::CLEAR, Draw::RPAction::DONT_CARE, Draw::RPAction::DONT_CARE }, "CopyToCurrentFboFromDisplayRam");
presentation_->NotifyPresent();
return;
}

Expand Down
7 changes: 3 additions & 4 deletions UI/EmuScreen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1387,6 +1387,9 @@ ScreenRenderFlags EmuScreen::render(ScreenRenderMode mode) {
gpu->CopyDisplayToOutput(true);
PSP_EndHostFrame();
}
if (gpu->PresentedThisFrame()) {
framebufferBound = true;
}
if (!framebufferBound) {
draw->BindFramebufferAsRenderTarget(nullptr, { RPAction::CLEAR, RPAction::CLEAR, RPAction::CLEAR, }, "EmuScreen_Behind");
}
Expand Down Expand Up @@ -1496,10 +1499,6 @@ ScreenRenderFlags EmuScreen::render(ScreenRenderMode mode) {
break;
}

if (framebufferBound && gpu) {
gpu->PresentedThisFrame();
}

PSP_EndHostFrame();

// This place rougly matches how libretro handles it (after retro_frame).
Expand Down

0 comments on commit 669c445

Please sign in to comment.