summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMorph <39850852+Morph1984@users.noreply.github.com>2021-03-10 17:15:05 +0100
committerMorph <39850852+Morph1984@users.noreply.github.com>2021-03-10 17:42:59 +0100
commit87cfe5b1da758c52df3c2d578937d86f4db79a8e (patch)
tree717c97114a5d8ce27c49c8f009acfa60ddf46c1b /src
parentMerge pull request #5891 from ameerj/bgra-ogl (diff)
downloadyuzu-87cfe5b1da758c52df3c2d578937d86f4db79a8e.tar
yuzu-87cfe5b1da758c52df3c2d578937d86f4db79a8e.tar.gz
yuzu-87cfe5b1da758c52df3c2d578937d86f4db79a8e.tar.bz2
yuzu-87cfe5b1da758c52df3c2d578937d86f4db79a8e.tar.lz
yuzu-87cfe5b1da758c52df3c2d578937d86f4db79a8e.tar.xz
yuzu-87cfe5b1da758c52df3c2d578937d86f4db79a8e.tar.zst
yuzu-87cfe5b1da758c52df3c2d578937d86f4db79a8e.zip
Diffstat (limited to 'src')
-rw-r--r--src/core/hle/service/time/time.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/core/hle/service/time/time.cpp b/src/core/hle/service/time/time.cpp
index 18629dd7e..16c942e21 100644
--- a/src/core/hle/service/time/time.cpp
+++ b/src/core/hle/service/time/time.cpp
@@ -341,12 +341,18 @@ void Module::Interface::CalculateStandardUserSystemClockDifferenceByUser(
void Module::Interface::CalculateSpanBetween(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));
Clock::TimeSpanType time_span_type{};
s64 span{};
+
if (const ResultCode result{snapshot_a.steady_clock_time_point.GetSpanBetween(
snapshot_b.steady_clock_time_point, span)};
result != RESULT_SUCCESS) {