Double frequency of VI callback & Patch engine callback

This commit is contained in:
shiiion 2022-01-31 00:51:07 -08:00
parent 959606e4a7
commit b0fdc6ca24
2 changed files with 8 additions and 13 deletions

View File

@ -560,14 +560,9 @@ if (_M_X86)
endif()
add_subdirectory(Externals/cpp-optparse)
find_package(fmt 7.1)
if(fmt_FOUND)
message(STATUS "Using shared fmt ${fmt_VERSION}")
else()
check_vendoring_approved(fmt)
message(STATUS "Using static fmt from Externals")
add_subdirectory(Externals/fmt EXCLUDE_FROM_ALL)
endif()
add_subdirectory(Externals/imgui)
add_subdirectory(Externals/glslang)

View File

@ -130,7 +130,7 @@ void IPC_HLE_UpdateCallback(u64 userdata, s64 cyclesLate)
void VICallback(u64 userdata, s64 cyclesLate)
{
VideoInterface::Update(CoreTiming::GetTicks() - cyclesLate);
CoreTiming::ScheduleEvent(VideoInterface::GetTicksPerHalfLine() - cyclesLate, et_VI);
CoreTiming::ScheduleEvent((VideoInterface::GetTicksPerHalfLine() / 2) - cyclesLate, et_VI);
}
void DecrementerCallback(u64 userdata, s64 cyclesLate)
@ -143,7 +143,7 @@ void PatchEngineCallback(u64 userdata, s64 cycles_late)
{
// We have 2 periods, a 1000 cycle error period and the VI period.
// We have to carefully combine these together so that we stay on the VI period without drifting.
u32 vi_interval = VideoInterface::GetTicksPerField();
u32 vi_interval = VideoInterface::GetTicksPerField() / 2;
s64 cycles_pruned = (userdata + cycles_late) % vi_interval;
s64 next_schedule = 0;