mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-30 17:49:48 -06:00
AVIDump: Move CoreTiming into caller.
This commit is contained in:
@ -119,7 +119,7 @@ static void IPC_HLE_UpdateCallback(u64 userdata, s64 cyclesLate)
|
||||
|
||||
static void VICallback(u64 userdata, s64 cyclesLate)
|
||||
{
|
||||
VideoInterface::Update();
|
||||
VideoInterface::Update(CoreTiming::GetTicks() - cyclesLate);
|
||||
CoreTiming::ScheduleEvent(VideoInterface::GetTicksPerHalfLine() - cyclesLate, et_VI);
|
||||
}
|
||||
|
||||
|
@ -638,7 +638,7 @@ u32 GetTicksPerField()
|
||||
return GetTicksPerEvenField();
|
||||
}
|
||||
|
||||
static void BeginField(FieldType field)
|
||||
static void BeginField(FieldType field, u64 ticks)
|
||||
{
|
||||
// Could we fit a second line of data in the stride?
|
||||
bool potentially_interlaced_xfb =
|
||||
@ -707,7 +707,7 @@ static void BeginField(FieldType field)
|
||||
// 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);
|
||||
g_video_backend->Video_BeginField(xfbAddr, fbWidth, fbStride, fbHeight, ticks);
|
||||
}
|
||||
|
||||
static void EndField()
|
||||
@ -717,7 +717,7 @@ static void EndField()
|
||||
|
||||
// Purpose: Send VI interrupt when triggered
|
||||
// Run when: When a frame is scanned (progressive/interlace)
|
||||
void Update()
|
||||
void Update(u64 ticks)
|
||||
{
|
||||
if (s_half_line_of_next_si_poll == s_half_line_count)
|
||||
{
|
||||
@ -726,11 +726,11 @@ void Update()
|
||||
}
|
||||
if (s_half_line_count == s_even_field_first_hl)
|
||||
{
|
||||
BeginField(FIELD_EVEN);
|
||||
BeginField(FIELD_EVEN, ticks);
|
||||
}
|
||||
else if (s_half_line_count == s_odd_field_first_hl)
|
||||
{
|
||||
BeginField(FIELD_ODD);
|
||||
BeginField(FIELD_ODD, ticks);
|
||||
}
|
||||
else if (s_half_line_count == s_even_field_last_hl)
|
||||
{
|
||||
|
@ -337,7 +337,7 @@ u32 GetXFBAddressTop();
|
||||
u32 GetXFBAddressBottom();
|
||||
|
||||
// Update and draw framebuffer
|
||||
void Update();
|
||||
void Update(u64 ticks);
|
||||
|
||||
// UpdateInterrupts: check if we have to generate a new VI Interrupt
|
||||
void UpdateInterrupts();
|
||||
|
Reference in New Issue
Block a user