SM: Fix svcGetSystemInfo bug, now works on 5.0.2.

This commit is contained in:
Michael Scire 2018-05-07 22:47:55 -06:00
parent 16ccc8a241
commit 44127faa17
2 changed files with 2 additions and 1 deletions

View File

@ -59,6 +59,7 @@ int main(int argc, char **argv)
Handle smm_h;
if (R_FAILED(Registration::RegisterServiceForSelf(smEncodeName("sm:m"), 1, false, &smm_h))) {
/* TODO: Panic. */
while (1) { }
}
server_manager->add_waitable(new ExistingPortServer<ManagerService>(smm_h, 1));

View File

@ -117,7 +117,7 @@ void Registration::CacheInitialProcessIdLimits() {
}
if (kernelAbove500()) {
svcGetSystemInfo(&g_initial_process_id_low, 2, 0, 0);
svcGetSystemInfo(&g_initial_process_id_high, 2, 0, 0);
svcGetSystemInfo(&g_initial_process_id_high, 2, 0, 1);
} else {
g_initial_process_id_low = 0;
g_initial_process_id_high = REGISTRATION_INITIAL_PID_MAX;