summaryrefslogtreecommitdiffstats
path: root/src/core/hle
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2021-04-11 07:11:53 +0200
committerGitHub <noreply@github.com>2021-04-11 07:11:53 +0200
commit4f60818eaecfb7dfae9f89523a7dd4a350979157 (patch)
tree14c75e6b1a84e52afe124a7aa6f47a6c9f25530f /src/core/hle
parentMerge pull request #6112 from ogniK5377/pctl (diff)
parentservice: time: Fix CalculateStandardUserSystemClockDifferenceByUser (diff)
downloadyuzu-4f60818eaecfb7dfae9f89523a7dd4a350979157.tar
yuzu-4f60818eaecfb7dfae9f89523a7dd4a350979157.tar.gz
yuzu-4f60818eaecfb7dfae9f89523a7dd4a350979157.tar.bz2
yuzu-4f60818eaecfb7dfae9f89523a7dd4a350979157.tar.lz
yuzu-4f60818eaecfb7dfae9f89523a7dd4a350979157.tar.xz
yuzu-4f60818eaecfb7dfae9f89523a7dd4a350979157.tar.zst
yuzu-4f60818eaecfb7dfae9f89523a7dd4a350979157.zip
Diffstat (limited to 'src/core/hle')
-rw-r--r--src/core/hle/service/time/time.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/core/hle/service/time/time.cpp b/src/core/hle/service/time/time.cpp
index 78543688f..f6ff39789 100644
--- a/src/core/hle/service/time/time.cpp
+++ b/src/core/hle/service/time/time.cpp
@@ -321,9 +321,14 @@ void Module::Interface::CalculateStandardUserSystemClockDifferenceByUser(
Kernel::HLERequestContext& ctx) {
LOG_DEBUG(Service_Time, "called");
- IPC::RequestParser rp{ctx};
- const auto snapshot_a = rp.PopRaw<Clock::ClockSnapshot>();
- const auto snapshot_b = rp.PopRaw<Clock::ClockSnapshot>();
+ Clock::ClockSnapshot snapshot_a;
+ Clock::ClockSnapshot snapshot_b;
+
+ const auto snapshot_a_data = ctx.ReadBuffer(0);
+ const auto snapshot_b_data = ctx.ReadBuffer(1);
+
+ std::memcpy(&snapshot_a, snapshot_a_data.data(), sizeof(Clock::ClockSnapshot));
+ std::memcpy(&snapshot_b, snapshot_b_data.data(), sizeof(Clock::ClockSnapshot));
auto time_span_type{Clock::TimeSpanType::FromSeconds(snapshot_b.user_context.offset -
snapshot_a.user_context.offset)};