TimingEvents: Don't defer frame done callback

This commit is contained in:
Stenzek
2024-08-19 19:41:14 +10:00
parent 86d4d92753
commit 41c8607782
6 changed files with 26 additions and 25 deletions

View File

@ -977,6 +977,7 @@ void GPU::CRTCTickEvent(TickCount ticks)
Timers::AddTicks(HBLANK_TIMER_INDEX, static_cast<TickCount>(hblank_timer_ticks));
}
bool frame_done = false;
while (lines_to_draw > 0)
{
const u32 lines_to_draw_this_loop =
@ -1007,7 +1008,7 @@ void GPU::CRTCTickEvent(TickCount ticks)
// TODO: move present in here I guess
FlushRender();
UpdateDisplay();
TimingEvents::SetFrameDone();
frame_done = true;
// switch fields early. this is needed so we draw to the correct one.
if (m_GPUSTAT.InInterleaved480iMode())
@ -1068,6 +1069,9 @@ void GPU::CRTCTickEvent(TickCount ticks)
}
UpdateCRTCTickEvent();
if (frame_done)
System::FrameDone();
}
void GPU::CommandTickEvent(TickCount ticks)