mirror of
https://github.com/yuzu-mirror/yuzu
synced 2024-12-20 07:43:08 +00:00
es: Implement ETicket GetCommonTicketSize (14)
Returns the size of the buffer needed to hold the common ticket associated with the rights ID.
This commit is contained in:
parent
669a21babb
commit
35b617b57f
1 changed files with 17 additions and 1 deletions
|
@ -29,7 +29,7 @@ public:
|
||||||
{11, &ETicket::ListCommonTicket, "ListCommonTicket"},
|
{11, &ETicket::ListCommonTicket, "ListCommonTicket"},
|
||||||
{12, &ETicket::ListPersonalizedTicket, "ListPersonalizedTicket"},
|
{12, &ETicket::ListPersonalizedTicket, "ListPersonalizedTicket"},
|
||||||
{13, nullptr, "ListMissingPersonalizedTicket"},
|
{13, nullptr, "ListMissingPersonalizedTicket"},
|
||||||
{14, nullptr, "GetCommonTicketSize"},
|
{14, &ETicket::GetCommonTicketSize, "GetCommonTicketSize"},
|
||||||
{15, nullptr, "GetPersonalizedTicketSize"},
|
{15, nullptr, "GetPersonalizedTicketSize"},
|
||||||
{16, nullptr, "GetCommonTicketData"},
|
{16, nullptr, "GetCommonTicketData"},
|
||||||
{17, nullptr, "GetPersonalizedTicketData"},
|
{17, nullptr, "GetPersonalizedTicketData"},
|
||||||
|
@ -190,6 +190,22 @@ private:
|
||||||
rb.Push<u32>(out_entries);
|
rb.Push<u32>(out_entries);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void GetCommonTicketSize(Kernel::HLERequestContext& ctx) {
|
||||||
|
IPC::RequestParser rp{ctx};
|
||||||
|
const auto rights_id = rp.PopRaw<u128>();
|
||||||
|
|
||||||
|
LOG_DEBUG(Service_ETicket, "called, rights_id={:016X}{:016X}", rights_id[1], rights_id[0]);
|
||||||
|
|
||||||
|
if (!CheckRightsId(ctx, rights_id))
|
||||||
|
return;
|
||||||
|
|
||||||
|
const auto ticket = keys.GetCommonTickets().at(rights_id);
|
||||||
|
|
||||||
|
IPC::ResponseBuilder rb{ctx, 4};
|
||||||
|
rb.Push(RESULT_SUCCESS);
|
||||||
|
rb.Push<u64>(ticket.size());
|
||||||
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
void InstallInterfaces(SM::ServiceManager& service_manager) {
|
void InstallInterfaces(SM::ServiceManager& service_manager) {
|
||||||
|
|
Loading…
Reference in a new issue