Skip to content
Snippets Groups Projects
Commit 71bc2182 authored by Zach Hilman's avatar Zach Hilman
Browse files

es: Implement ETicket CountCommonTicket (9)

Returns the number of common (non-console-unique) tickets in the KeyManager.
parent 475a7a44
No related branches found
No related tags found
No related merge requests found
......@@ -24,7 +24,7 @@ public:
{6, nullptr, "DeleteAllPersonalizedTicket"},
{7, nullptr, "DeleteAllPersonalizedTicketEx"},
{8, &ETicket::GetTitleKey, "GetTitleKey"},
{9, nullptr, "CountCommonTicket"},
{9, &ETicket::CountCommonTicket, "CountCommonTicket"},
{10, nullptr, "CountPersonalizedTicket"},
{11, nullptr, "ListCommonTicket"},
{12, nullptr, "ListPersonalizedTicket"},
......@@ -122,6 +122,17 @@ private:
rb.Push(RESULT_SUCCESS);
}
void CountCommonTicket(Kernel::HLERequestContext& ctx) {
LOG_DEBUG(Service_ETicket, "called");
keys.PopulateTickets();
const auto count = keys.GetCommonTickets().size();
IPC::ResponseBuilder rb{ctx, 3};
rb.Push(RESULT_SUCCESS);
rb.Push<u32>(count);
}
};
void InstallInterfaces(SM::ServiceManager& service_manager) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment