CoreTiming: wrap into class
This commit is contained in:
parent
7c3d325aff
commit
9458e4d8ec
34 changed files with 413 additions and 413 deletions
|
@ -31,7 +31,7 @@ Regs g_regs;
|
|||
/// 268MHz CPU clocks / 60Hz frames per second
|
||||
const u64 frame_ticks = static_cast<u64>(BASE_CLOCK_RATE_ARM11 / SCREEN_REFRESH_RATE);
|
||||
/// Event id for CoreTiming
|
||||
static CoreTiming::EventType* vblank_event;
|
||||
static Core::TimingEventType* vblank_event;
|
||||
|
||||
template <typename T>
|
||||
inline void Read(T& var, const u32 raw_addr) {
|
||||
|
@ -522,7 +522,7 @@ static void VBlankCallback(u64 userdata, s64 cycles_late) {
|
|||
Service::GSP::SignalInterrupt(Service::GSP::InterruptId::PDC1);
|
||||
|
||||
// Reschedule recurrent event
|
||||
CoreTiming::ScheduleEvent(frame_ticks - cycles_late, vblank_event);
|
||||
Core::System::GetInstance().CoreTiming().ScheduleEvent(frame_ticks - cycles_late, vblank_event);
|
||||
}
|
||||
|
||||
/// Initialize hardware
|
||||
|
@ -555,8 +555,9 @@ void Init() {
|
|||
framebuffer_sub.color_format.Assign(Regs::PixelFormat::RGB8);
|
||||
framebuffer_sub.active_fb = 0;
|
||||
|
||||
vblank_event = CoreTiming::RegisterEvent("GPU::VBlankCallback", VBlankCallback);
|
||||
CoreTiming::ScheduleEvent(frame_ticks, vblank_event);
|
||||
Core::Timing& timing = Core::System::GetInstance().CoreTiming();
|
||||
vblank_event = timing.RegisterEvent("GPU::VBlankCallback", VBlankCallback);
|
||||
timing.ScheduleEvent(frame_ticks, vblank_event);
|
||||
|
||||
LOG_DEBUG(HW_GPU, "initialized OK");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue