citra-emu
/
citra
Archived
1
0
Fork 0

Service/AM: Use Pop<u64>() in DeleteUserProgram and DeleteProgram

This commit is contained in:
Valentin Vanelslande 2018-03-28 20:28:18 -06:00 committed by GitHub
parent 74465389f3
commit 492fca114d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 6 deletions

View File

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