summaryrefslogtreecommitdiffstats
path: root/src/core/hle
diff options
context:
space:
mode:
authorZach Hilman <zachhilman@gmail.com>2019-04-10 20:07:00 +0200
committerZach Hilman <zachhilman@gmail.com>2019-07-08 03:38:33 +0200
commit44b0c19f6a0a9491028800ca0a10dc74c954b258 (patch)
tree7843ba3b6557c77b5e61f1b4a170f2dc99724c27 /src/core/hle
parentes: Implement ETicket GetCommonTicketSize (14) (diff)
downloadyuzu-44b0c19f6a0a9491028800ca0a10dc74c954b258.tar
yuzu-44b0c19f6a0a9491028800ca0a10dc74c954b258.tar.gz
yuzu-44b0c19f6a0a9491028800ca0a10dc74c954b258.tar.bz2
yuzu-44b0c19f6a0a9491028800ca0a10dc74c954b258.tar.lz
yuzu-44b0c19f6a0a9491028800ca0a10dc74c954b258.tar.xz
yuzu-44b0c19f6a0a9491028800ca0a10dc74c954b258.tar.zst
yuzu-44b0c19f6a0a9491028800ca0a10dc74c954b258.zip
Diffstat (limited to 'src/core/hle')
-rw-r--r--src/core/hle/service/es/es.cpp18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/core/hle/service/es/es.cpp b/src/core/hle/service/es/es.cpp
index 0125b3ba9..e18f27e7a 100644
--- a/src/core/hle/service/es/es.cpp
+++ b/src/core/hle/service/es/es.cpp
@@ -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) {