More presentation fixes

This commit is contained in:
Henrik Rydgård 2024-10-17 22:21:25 +02:00
parent 8a822cb851
commit e167a54b8e
2 changed files with 4 additions and 4 deletions

View File

@ -628,6 +628,7 @@ void SoftGPU::CopyToCurrentFboFromDisplayRam(int srcwidth, int srcheight) {
} }
if (!hasImage) { if (!hasImage) {
draw_->BindFramebufferAsRenderTarget(nullptr, { Draw::RPAction::CLEAR, Draw::RPAction::DONT_CARE, Draw::RPAction::DONT_CARE }, "CopyToCurrentFboFromDisplayRam"); draw_->BindFramebufferAsRenderTarget(nullptr, { Draw::RPAction::CLEAR, Draw::RPAction::DONT_CARE, Draw::RPAction::DONT_CARE }, "CopyToCurrentFboFromDisplayRam");
presentation_->NotifyPresent();
return; return;
} }

View File

@ -1387,6 +1387,9 @@ ScreenRenderFlags EmuScreen::render(ScreenRenderMode mode) {
gpu->CopyDisplayToOutput(true); gpu->CopyDisplayToOutput(true);
PSP_EndHostFrame(); PSP_EndHostFrame();
} }
if (gpu->PresentedThisFrame()) {
framebufferBound = true;
}
if (!framebufferBound) { if (!framebufferBound) {
draw->BindFramebufferAsRenderTarget(nullptr, { RPAction::CLEAR, RPAction::CLEAR, RPAction::CLEAR, }, "EmuScreen_Behind"); draw->BindFramebufferAsRenderTarget(nullptr, { RPAction::CLEAR, RPAction::CLEAR, RPAction::CLEAR, }, "EmuScreen_Behind");
} }
@ -1496,10 +1499,6 @@ ScreenRenderFlags EmuScreen::render(ScreenRenderMode mode) {
break; break;
} }
if (framebufferBound && gpu) {
gpu->PresentedThisFrame();
}
PSP_EndHostFrame(); PSP_EndHostFrame();
// This place rougly matches how libretro handles it (after retro_frame). // This place rougly matches how libretro handles it (after retro_frame).