Merge pull request #3605 from valentinvanelslande/am-popu64

Service/AM: Use Pop<u64>() in DeleteUserProgram and DeleteProgram
This commit is contained in:
Weiyi Wang 2018-03-29 09:47:56 +03:00 committed by GitHub
commit 82b9387315
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -687,9 +687,7 @@ void Module::Interface::GetProgramInfos(Kernel::HLERequestContext& ctx) {
void Module::Interface::DeleteUserProgram(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x0004, 3, 0);
auto media_type = rp.PopEnum<FS::MediaType>();
u32 low = rp.Pop<u32>();
u32 high = rp.Pop<u32>();
u64 title_id = static_cast<u64>(low) | (static_cast<u64>(high) << 32);
u64 title_id = rp.Pop<u64>();
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);
u16 category = static_cast<u16>((title_id >> 32) & 0xFFFF);
u8 variation = static_cast<u8>(title_id & 0xFF);
@ -1176,9 +1174,7 @@ void Module::Interface::GetRequiredSizeFromCia(Kernel::HLERequestContext& ctx) {
void Module::Interface::DeleteProgram(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x0410, 3, 0);
auto media_type = rp.PopEnum<FS::MediaType>();
u32 low = rp.Pop<u32>();
u32 high = rp.Pop<u32>();
u64 title_id = static_cast<u64>(low) | (static_cast<u64>(high) << 32);
u64 title_id = rp.Pop<u64>();
LOG_INFO(Service_AM, "Deleting title 0x%016" PRIx64, title_id);
std::string path = GetTitlePath(media_type, title_id);
IPC::RequestBuilder rb = rp.MakeBuilder(1, 0);