early-access version 1514
This commit is contained in:
parent
a1bb4ca7b1
commit
2e02de8e7f
2 changed files with 12 additions and 4 deletions
|
@ -1,7 +1,7 @@
|
||||||
yuzu emulator early access
|
yuzu emulator early access
|
||||||
=============
|
=============
|
||||||
|
|
||||||
This is the source code for early-access 1513.
|
This is the source code for early-access 1514.
|
||||||
|
|
||||||
## Legal Notice
|
## Legal Notice
|
||||||
|
|
||||||
|
|
|
@ -140,6 +140,8 @@ ResultCode Module::Interface::GetClockSnapshotFromSystemClockContextInternal(
|
||||||
|
|
||||||
const auto current_time_point{
|
const auto current_time_point{
|
||||||
time_manager.GetStandardSteadyClockCore().GetCurrentTimePoint(system)};
|
time_manager.GetStandardSteadyClockCore().GetCurrentTimePoint(system)};
|
||||||
|
clock_snapshot.steady_clock_time_point = current_time_point;
|
||||||
|
|
||||||
if (const ResultCode result{Clock::ClockSnapshot::GetCurrentTime(
|
if (const ResultCode result{Clock::ClockSnapshot::GetCurrentTime(
|
||||||
clock_snapshot.user_time, current_time_point, clock_snapshot.user_context)};
|
clock_snapshot.user_time, current_time_point, clock_snapshot.user_context)};
|
||||||
result != RESULT_SUCCESS) {
|
result != RESULT_SUCCESS) {
|
||||||
|
@ -341,12 +343,18 @@ void Module::Interface::CalculateStandardUserSystemClockDifferenceByUser(
|
||||||
void Module::Interface::CalculateSpanBetween(Kernel::HLERequestContext& ctx) {
|
void Module::Interface::CalculateSpanBetween(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_DEBUG(Service_Time, "called");
|
LOG_DEBUG(Service_Time, "called");
|
||||||
|
|
||||||
IPC::RequestParser rp{ctx};
|
Clock::ClockSnapshot snapshot_a;
|
||||||
const auto snapshot_a = rp.PopRaw<Clock::ClockSnapshot>();
|
Clock::ClockSnapshot snapshot_b;
|
||||||
const auto snapshot_b = rp.PopRaw<Clock::ClockSnapshot>();
|
|
||||||
|
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{};
|
Clock::TimeSpanType time_span_type{};
|
||||||
s64 span{};
|
s64 span{};
|
||||||
|
|
||||||
if (const ResultCode result{snapshot_a.steady_clock_time_point.GetSpanBetween(
|
if (const ResultCode result{snapshot_a.steady_clock_time_point.GetSpanBetween(
|
||||||
snapshot_b.steady_clock_time_point, span)};
|
snapshot_b.steady_clock_time_point, span)};
|
||||||
result != RESULT_SUCCESS) {
|
result != RESULT_SUCCESS) {
|
||||||
|
|
Loading…
Reference in a new issue