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) {
draw_->BindFramebufferAsRenderTarget(nullptr, { Draw::RPAction::CLEAR, Draw::RPAction::DONT_CARE, Draw::RPAction::DONT_CARE }, "CopyToCurrentFboFromDisplayRam");
presentation_->NotifyPresent();
return;
}

View File

@ -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");
}
@ -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).