mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2024-11-17 23:12:17 +00:00
sm: change location of apm:p check, fixes failure to launch older games
This commit is contained in:
parent
ed86c44a49
commit
a09c08994f
@ -95,15 +95,6 @@ Registration::Service *Registration::GetFreeService() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool Registration::IsValidForSac(u8 *sac, size_t sac_size, u64 service, bool is_host) {
|
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;
|
u8 cur_ctrl;
|
||||||
u64 cur_service;
|
u64 cur_service;
|
||||||
u64 service_for_compare;
|
u64 service_for_compare;
|
||||||
@ -311,6 +302,15 @@ Result Registration::GetServiceForPid(u64 pid, u64 service, Handle *out) {
|
|||||||
return ResultSmInvalidServiceName;
|
return ResultSmInvalidServiceName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* 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 ResultSmNotAllowed;
|
||||||
|
}
|
||||||
|
|
||||||
if (!IsInitialProcess(pid)) {
|
if (!IsInitialProcess(pid)) {
|
||||||
Registration::Process *proc = GetProcessForPid(pid);
|
Registration::Process *proc = GetProcessForPid(pid);
|
||||||
if (proc == NULL) {
|
if (proc == NULL) {
|
||||||
|
Loading…
Reference in New Issue
Block a user