mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-30 10:42:47 +01:00
es: Implement ETicket GetPersonalizedTicketSize (15)
Returns the size of the buffer needed to hold the personal ticket associated with the rights ID.
This commit is contained in:
parent
35b617b57f
commit
44b0c19f6a
1 changed files with 17 additions and 1 deletions
|
@ -30,7 +30,7 @@ public:
|
|||
{12, &ETicket::ListPersonalizedTicket, "ListPersonalizedTicket"},
|
||||
{13, nullptr, "ListMissingPersonalizedTicket"},
|
||||
{14, &ETicket::GetCommonTicketSize, "GetCommonTicketSize"},
|
||||
{15, nullptr, "GetPersonalizedTicketSize"},
|
||||
{15, &ETicket::GetPersonalizedTicketSize, "GetPersonalizedTicketSize"},
|
||||
{16, nullptr, "GetCommonTicketData"},
|
||||
{17, nullptr, "GetPersonalizedTicketData"},
|
||||
{18, nullptr, "OwnTicket"},
|
||||
|
@ -206,6 +206,22 @@ private:
|
|||
rb.Push<u64>(ticket.size());
|
||||
}
|
||||
|
||||
void GetPersonalizedTicketSize(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.GetPersonalizedTickets().at(rights_id);
|
||||
|
||||
IPC::ResponseBuilder rb{ctx, 4};
|
||||
rb.Push(RESULT_SUCCESS);
|
||||
rb.Push<u64>(ticket.size());
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
void InstallInterfaces(SM::ServiceManager& service_manager) {
|
||||
|
|
Loading…
Reference in a new issue