This commit is contained in:
Kelebek1
2022-07-10 08:29:37 +01:00
parent 240650f6a6
commit b23c6b456c
5 changed files with 9 additions and 11 deletions

View File

@ -73,14 +73,14 @@ NVFlinger::NVFlinger(Core::System& system_, HosBinderDriverServer& hos_binder_dr
const auto lock_guard = Lock();
Compose();
return std::chrono::nanoseconds(GetNextTicks()) - ns_late;
return std::max(std::chrono::nanoseconds::zero(),
std::chrono::nanoseconds(GetNextTicks()) - ns_late);
});
if (system.IsMulticore()) {
vsync_thread = std::jthread([this](std::stop_token token) { SplitVSync(token); });
} else {
system.CoreTiming().ScheduleLoopingEvent(std::chrono::nanoseconds(0), frame_ns,
composition_event);
system.CoreTiming().ScheduleLoopingEvent(frame_ns, frame_ns, composition_event);
}
}