summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2019-11-24 19:52:28 +0100
committerGitHub <noreply@github.com>2019-11-24 19:52:28 +0100
commit7298dcc016f586f97e14287587741ddcc9534340 (patch)
treeff254bcae21cc4845dbd32319f560a3e44e8525f /src
parentMerge pull request #3153 from FearlessTobi/port-4964 (diff)
parentUpdate svc.cpp (diff)
downloadyuzu-7298dcc016f586f97e14287587741ddcc9534340.tar
yuzu-7298dcc016f586f97e14287587741ddcc9534340.tar.gz
yuzu-7298dcc016f586f97e14287587741ddcc9534340.tar.bz2
yuzu-7298dcc016f586f97e14287587741ddcc9534340.tar.lz
yuzu-7298dcc016f586f97e14287587741ddcc9534340.tar.xz
yuzu-7298dcc016f586f97e14287587741ddcc9534340.tar.zst
yuzu-7298dcc016f586f97e14287587741ddcc9534340.zip
Diffstat (limited to '')
-rw-r--r--src/core/hle/kernel/svc.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/core/hle/kernel/svc.cpp b/src/core/hle/kernel/svc.cpp
index 8c67ada43..4c3b53a88 100644
--- a/src/core/hle/kernel/svc.cpp
+++ b/src/core/hle/kernel/svc.cpp
@@ -17,6 +17,7 @@
#include "core/core.h"
#include "core/core_cpu.h"
#include "core/core_timing.h"
+#include "core/core_timing_util.h"
#include "core/hle/kernel/address_arbiter.h"
#include "core/hle/kernel/client_port.h"
#include "core/hle/kernel/client_session.h"
@@ -1777,7 +1778,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);