diff options
author | Lioncash <mathew1800@gmail.com> | 2019-11-14 22:29:31 +0100 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2019-11-14 22:31:52 +0100 |
commit | 2c4c2b5eeeae29413a59548bda40b225c443ce91 (patch) | |
tree | d583634f9bc508c35c805611d01aad9ed355e7cb | |
parent | Merge pull request #3089 from SciresM/play_statistics (diff) | |
download | yuzu-2c4c2b5eeeae29413a59548bda40b225c443ce91.tar yuzu-2c4c2b5eeeae29413a59548bda40b225c443ce91.tar.gz yuzu-2c4c2b5eeeae29413a59548bda40b225c443ce91.tar.bz2 yuzu-2c4c2b5eeeae29413a59548bda40b225c443ce91.tar.lz yuzu-2c4c2b5eeeae29413a59548bda40b225c443ce91.tar.xz yuzu-2c4c2b5eeeae29413a59548bda40b225c443ce91.tar.zst yuzu-2c4c2b5eeeae29413a59548bda40b225c443ce91.zip |
-rw-r--r-- | src/core/hle/service/am/am.cpp | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/src/core/hle/service/am/am.cpp b/src/core/hle/service/am/am.cpp index d52ec4387..d79997fe0 100644 --- a/src/core/hle/service/am/am.cpp +++ b/src/core/hle/service/am/am.cpp @@ -1336,12 +1336,16 @@ void IApplicationFunctions::GetPseudoDeviceId(Kernel::HLERequestContext& ctx) { } void IApplicationFunctions::ExtendSaveData(Kernel::HLERequestContext& ctx) { + struct Parameters { + FileSys::SaveDataType type; + u128 user_id; + u64 new_normal_size; + u64 new_journal_size; + }; + static_assert(sizeof(Parameters) == 40); + IPC::RequestParser rp{ctx}; - const auto type{rp.PopRaw<FileSys::SaveDataType>()}; - rp.Skip(1, false); - const auto user_id{rp.PopRaw<u128>()}; - const auto new_normal_size{rp.PopRaw<u64>()}; - const auto new_journal_size{rp.PopRaw<u64>()}; + const auto [type, user_id, new_normal_size, new_journal_size] = rp.PopRaw<Parameters>(); LOG_DEBUG(Service_AM, "called with type={:02X}, user_id={:016X}{:016X}, new_normal={:016X}, " @@ -1360,10 +1364,14 @@ void IApplicationFunctions::ExtendSaveData(Kernel::HLERequestContext& ctx) { } void IApplicationFunctions::GetSaveDataSize(Kernel::HLERequestContext& ctx) { + struct Parameters { + FileSys::SaveDataType type; + u128 user_id; + }; + static_assert(sizeof(Parameters) == 24); + IPC::RequestParser rp{ctx}; - const auto type{rp.PopRaw<FileSys::SaveDataType>()}; - rp.Skip(1, false); - const auto user_id{rp.PopRaw<u128>()}; + const auto [type, user_id] = rp.PopRaw<Parameters>(); LOG_DEBUG(Service_AM, "called with type={:02X}, user_id={:016X}{:016X}", static_cast<u8>(type), user_id[1], user_id[0]); |