XFB: Send image to screen at start of field.

This is much more accurate to the hardware, and saves around 16ms
of latency.
This commit is contained in:
Scott Mansell
2016-06-28 15:12:43 +12:00
parent 93a5efa347
commit 35566316ed
3 changed files with 8 additions and 18 deletions

View File

@ -700,13 +700,16 @@ static void BeginField(FieldType field)
DEBUG_LOG(VIDEOINTERFACE, "HorizScaling: %04x | fbwidth %d | %u | %u", m_HorizontalScaling.Hex,
m_FBWidth.Hex, GetTicksPerEvenField(), GetTicksPerOddField());
// This assumes the game isn't going to change the VI registers while a
// frame is scanning out.
// To correctly handle that case we would need to collate all changes
// to VI during scanout and delay outputting the frame till then.
if (xfbAddr)
g_video_backend->Video_BeginField(xfbAddr, fbWidth, fbStride, fbHeight);
}
static void EndField()
{
g_video_backend->Video_EndField();
Core::VideoThrottle();
}