Răsfoiți Sursa

time: Fix GetClockSnapshotFromSystemClockContext

This removes an incorrect alignment usage and corrects the positions of the popped parameters.

- Fixes Super Kirby Clash crashing on boot
Morph 5 ani în urmă
părinte
comite
a223006c50
1 a modificat fișierele cu 3 adăugiri și 2 ștergeri
  1. 3 2
      src/core/hle/service/time/time.cpp

+ 3 - 2
src/core/hle/service/time/time.cpp

@@ -303,7 +303,7 @@ void Module::Interface::GetClockSnapshotFromSystemClockContext(Kernel::HLEReques
     IPC::RequestParser rp{ctx};
     IPC::RequestParser rp{ctx};
     const auto type{rp.PopEnum<Clock::TimeType>()};
     const auto type{rp.PopEnum<Clock::TimeType>()};
 
 
-    rp.AlignWithPadding();
+    rp.Skip(1, false);
 
 
     const Clock::SystemClockContext user_context{rp.PopRaw<Clock::SystemClockContext>()};
     const Clock::SystemClockContext user_context{rp.PopRaw<Clock::SystemClockContext>()};
     const Clock::SystemClockContext network_context{rp.PopRaw<Clock::SystemClockContext>()};
     const Clock::SystemClockContext network_context{rp.PopRaw<Clock::SystemClockContext>()};
@@ -319,9 +319,10 @@ void Module::Interface::GetClockSnapshotFromSystemClockContext(Kernel::HLEReques
         return;
         return;
     }
     }
 
 
+    ctx.WriteBuffer(clock_snapshot);
+
     IPC::ResponseBuilder rb{ctx, 2};
     IPC::ResponseBuilder rb{ctx, 2};
     rb.Push(RESULT_SUCCESS);
     rb.Push(RESULT_SUCCESS);
-    ctx.WriteBuffer(clock_snapshot);
 }
 }
 
 
 void Module::Interface::CalculateStandardUserSystemClockDifferenceByUser(
 void Module::Interface::CalculateStandardUserSystemClockDifferenceByUser(