yuzu-emu
/
yuzu
Archived
1
0
Fork 0

svc: GetSystemTick should return cntpct_el0, not core ticks.

This commit is contained in:
bunnei 2019-11-22 15:55:42 -05:00
parent 6a3fc5d2ff
commit 6eaf7ab55f
1 changed files with 3 additions and 1 deletions

View File

@ -1777,7 +1777,9 @@ static u64 GetSystemTick(Core::System& system) {
LOG_TRACE(Kernel_SVC, "called");
auto& core_timing = system.CoreTiming();
const u64 result{core_timing.GetTicks()};
// Returns the value of cntpct_el0 (https://switchbrew.org/wiki/SVC#svcGetSystemTick)
const u64 result{Core::Timing::CpuCyclesToClockCycles(system.CoreTiming().GetTicks())};
// Advance time to defeat dumb games that busy-wait for the frame to end.
core_timing.AddTicks(400);