diff options
| author | Thog <me@thog.eu> | 2019-11-27 19:27:30 +0100 |
|---|---|---|
| committer | Ac_K <Acoustik666@gmail.com> | 2019-11-27 19:27:30 +0100 |
| commit | c24e1892adbf20ab9938cb63b2e7f3bae861480c (patch) | |
| tree | ab68968d3e1bb2f08a9fe65d381c4c1e3ee83d8e | |
| parent | 69329dc56951093888d3c0e2139e492873a8fae1 (diff) | |
time: Fix wrong buffer usage in CalculateStandardUserSystemClockDifferenceByUser & CalculateSpanBetween (#836)
| -rw-r--r-- | Ryujinx.HLE/HOS/Services/Time/IStaticServiceForPsc.cs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Ryujinx.HLE/HOS/Services/Time/IStaticServiceForPsc.cs b/Ryujinx.HLE/HOS/Services/Time/IStaticServiceForPsc.cs index 5ea3910f..f5cecdbb 100644 --- a/Ryujinx.HLE/HOS/Services/Time/IStaticServiceForPsc.cs +++ b/Ryujinx.HLE/HOS/Services/Time/IStaticServiceForPsc.cs @@ -290,8 +290,8 @@ namespace Ryujinx.HLE.HOS.Services.Time // CalculateStandardUserSystemClockDifferenceByUser(buffer<nn::time::sf::ClockSnapshot, 0x19>, buffer<nn::time::sf::ClockSnapshot, 0x19>) -> nn::TimeSpanType public ResultCode CalculateStandardUserSystemClockDifferenceByUser(ServiceCtx context) { - ClockSnapshot clockSnapshotA = ReadClockSnapshotFromBuffer(context, context.Request.ExchangeBuff[0]); - ClockSnapshot clockSnapshotB = ReadClockSnapshotFromBuffer(context, context.Request.ExchangeBuff[1]); + ClockSnapshot clockSnapshotA = ReadClockSnapshotFromBuffer(context, context.Request.PtrBuff[0]); + ClockSnapshot clockSnapshotB = ReadClockSnapshotFromBuffer(context, context.Request.PtrBuff[1]); TimeSpanType difference = TimeSpanType.FromSeconds(clockSnapshotB.UserContext.Offset - clockSnapshotA.UserContext.Offset); if (clockSnapshotB.UserContext.SteadyTimePoint.ClockSourceId != clockSnapshotA.UserContext.SteadyTimePoint.ClockSourceId || (clockSnapshotB.IsAutomaticCorrectionEnabled && clockSnapshotA.IsAutomaticCorrectionEnabled)) @@ -308,8 +308,8 @@ namespace Ryujinx.HLE.HOS.Services.Time // CalculateSpanBetween(buffer<nn::time::sf::ClockSnapshot, 0x19>, buffer<nn::time::sf::ClockSnapshot, 0x19>) -> nn::TimeSpanType public ResultCode CalculateSpanBetween(ServiceCtx context) { - ClockSnapshot clockSnapshotA = ReadClockSnapshotFromBuffer(context, context.Request.ExchangeBuff[0]); - ClockSnapshot clockSnapshotB = ReadClockSnapshotFromBuffer(context, context.Request.ExchangeBuff[1]); + ClockSnapshot clockSnapshotA = ReadClockSnapshotFromBuffer(context, context.Request.PtrBuff[0]); + ClockSnapshot clockSnapshotB = ReadClockSnapshotFromBuffer(context, context.Request.PtrBuff[1]); TimeSpanType result; @@ -397,7 +397,7 @@ namespace Ryujinx.HLE.HOS.Services.Time return result; } - private ClockSnapshot ReadClockSnapshotFromBuffer(ServiceCtx context, IpcBuffDesc ipcDesc) + private ClockSnapshot ReadClockSnapshotFromBuffer(ServiceCtx context, IpcPtrBuffDesc ipcDesc) { Debug.Assert(ipcDesc.Size == Marshal.SizeOf<ClockSnapshot>()); |
