summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2019-11-21 21:30:01 +0100
committerGitHub <noreply@github.com>2019-11-21 21:30:01 +0100
commiteedb0485854630f27f1f10a37ecc0a6915dd4d15 (patch)
treefecac1ca41b63652dc7195223214f48d4ed4fae2 /src
parentMerge pull request #3111 from lioncash/query (diff)
parentservice/am: Remove unnecessary Skip calls (diff)
downloadyuzu-eedb0485854630f27f1f10a37ecc0a6915dd4d15.tar
yuzu-eedb0485854630f27f1f10a37ecc0a6915dd4d15.tar.gz
yuzu-eedb0485854630f27f1f10a37ecc0a6915dd4d15.tar.bz2
yuzu-eedb0485854630f27f1f10a37ecc0a6915dd4d15.tar.lz
yuzu-eedb0485854630f27f1f10a37ecc0a6915dd4d15.tar.xz
yuzu-eedb0485854630f27f1f10a37ecc0a6915dd4d15.tar.zst
yuzu-eedb0485854630f27f1f10a37ecc0a6915dd4d15.zip
Diffstat (limited to 'src')
-rw-r--r--src/core/hle/service/am/am.cpp24
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 96ec41010..701f05019 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]);