summaryrefslogtreecommitdiff
path: root/src/core/hle/svc.cpp
diff options
context:
space:
mode:
authorGravatar bunnei2014-08-14 20:01:02 -0400
committerGravatar bunnei2014-08-18 21:26:20 -0400
commit10f25866e268756cc32e2e783b3377c34529f7e6 (patch)
tree92909d5c039a62e69fe2bc91d2a6e3c4de8b4f79 /src/core/hle/svc.cpp
parentMerge pull request #57 from lioncash/str (diff)
downloadyuzu-10f25866e268756cc32e2e783b3377c34529f7e6.tar.gz
yuzu-10f25866e268756cc32e2e783b3377c34529f7e6.tar.xz
yuzu-10f25866e268756cc32e2e783b3377c34529f7e6.zip
SVC: Added support for svc_GetSystemTick.
Changed HLE function return methods to be static inline functions.
Diffstat (limited to 'src/core/hle/svc.cpp')
-rw-r--r--src/core/hle/svc.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/core/hle/svc.cpp b/src/core/hle/svc.cpp
index 8720bed31..4f5ad805e 100644
--- a/src/core/hle/svc.cpp
+++ b/src/core/hle/svc.cpp
@@ -330,6 +330,11 @@ void SleepThread(s64 nanoseconds) {
330 DEBUG_LOG(SVC, "called nanoseconds=%d", nanoseconds); 330 DEBUG_LOG(SVC, "called nanoseconds=%d", nanoseconds);
331} 331}
332 332
333/// This returns the total CPU ticks elapsed since the CPU was powered-on
334s64 GetSystemTick() {
335 return (s64)Core::g_app_core->GetTicks();
336}
337
333const HLE::FunctionDef SVC_Table[] = { 338const HLE::FunctionDef SVC_Table[] = {
334 {0x00, nullptr, "Unknown"}, 339 {0x00, nullptr, "Unknown"},
335 {0x01, HLE::Wrap<ControlMemory>, "ControlMemory"}, 340 {0x01, HLE::Wrap<ControlMemory>, "ControlMemory"},
@@ -371,7 +376,7 @@ const HLE::FunctionDef SVC_Table[] = {
371 {0x25, HLE::Wrap<WaitSynchronizationN>, "WaitSynchronizationN"}, 376 {0x25, HLE::Wrap<WaitSynchronizationN>, "WaitSynchronizationN"},
372 {0x26, nullptr, "SignalAndWait"}, 377 {0x26, nullptr, "SignalAndWait"},
373 {0x27, HLE::Wrap<DuplicateHandle>, "DuplicateHandle"}, 378 {0x27, HLE::Wrap<DuplicateHandle>, "DuplicateHandle"},
374 {0x28, nullptr, "GetSystemTick"}, 379 {0x28, HLE::Wrap<GetSystemTick>, "GetSystemTick"},
375 {0x29, nullptr, "GetHandleInfo"}, 380 {0x29, nullptr, "GetHandleInfo"},
376 {0x2A, nullptr, "GetSystemInfo"}, 381 {0x2A, nullptr, "GetSystemInfo"},
377 {0x2B, nullptr, "GetProcessInfo"}, 382 {0x2B, nullptr, "GetProcessInfo"},