From 4e5f033e415a72079029fe9b9eab32d8cdf6178d Mon Sep 17 00:00:00 2001 From: Michael Scire Date: Thu, 18 Apr 2019 18:25:39 -0700 Subject: [PATCH] sm: for 8.0.0, add some first class homebrew support --- stratosphere/sm/source/sm_registration.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/stratosphere/sm/source/sm_registration.cpp b/stratosphere/sm/source/sm_registration.cpp index c9df5b026..390686e26 100644 --- a/stratosphere/sm/source/sm_registration.cpp +++ b/stratosphere/sm/source/sm_registration.cpp @@ -95,6 +95,15 @@ Registration::Service *Registration::GetFreeService() { } bool Registration::IsValidForSac(u8 *sac, size_t sac_size, u64 service, bool is_host) { + /* In 8.0.0, Nintendo removed the service apm:p -- however, all homebrew attempts to get */ + /* a handle to this when calling appletInitialize(). Because hbl has access to all services, */ + /* This would return true, and homebrew would *wait forever* trying to get a handle to a service */ + /* that will never register. Thus, in the interest of not breaking every single piece of homebrew */ + /* we will provide a little first class help. */ + if (GetRuntimeFirmwareVersion() >= FirmwareVersion_800 && service == EncodeNameConstant("apm:p")) { + return false; + } + u8 cur_ctrl; u64 cur_service; u64 service_for_compare;