mirror of
https://github.com/Atmosphere-NX/Atmosphere
synced 2024-11-10 07:06:34 +00:00
PM: Fix missing flags set/missing wait. Now works on 5.x.
This commit is contained in:
parent
3682a56062
commit
173e6c8c0f
2 changed files with 13 additions and 3 deletions
|
@ -122,7 +122,7 @@ void Registration::HandleProcessLaunch() {
|
||||||
new_process.flags |= 0x40;
|
new_process.flags |= 0x40;
|
||||||
}
|
}
|
||||||
if (kernelAbove200() && LAUNCHFLAGS_NOTIYDEBUGSPECIAL(launch_flags) && (program_info.application_type & 4)) {
|
if (kernelAbove200() && LAUNCHFLAGS_NOTIYDEBUGSPECIAL(launch_flags) && (program_info.application_type & 4)) {
|
||||||
|
new_process.flags |= 0x80;
|
||||||
}
|
}
|
||||||
if (LAUNCHFLAGS_NOTIFYWHENEXITED(launch_flags)) {
|
if (LAUNCHFLAGS_NOTIFYWHENEXITED(launch_flags)) {
|
||||||
new_process.flags |= 1;
|
new_process.flags |= 1;
|
||||||
|
|
|
@ -123,6 +123,7 @@ void ResourceLimitUtils::InitializeLimits() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void ResourceLimitUtils::EnsureApplicationResourcesAvailable() {
|
void ResourceLimitUtils::EnsureApplicationResourcesAvailable() {
|
||||||
|
Result rc;
|
||||||
Handle application_reslimit_h = g_resource_limit_handles[1];
|
Handle application_reslimit_h = g_resource_limit_handles[1];
|
||||||
for (unsigned int i = 0; i < 5; i++) {
|
for (unsigned int i = 0; i < 5; i++) {
|
||||||
u64 result;
|
u64 result;
|
||||||
|
@ -133,6 +134,15 @@ void ResourceLimitUtils::EnsureApplicationResourcesAvailable() {
|
||||||
svcSleepThread(1000000ULL);
|
svcSleepThread(1000000ULL);
|
||||||
} while (result);
|
} while (result);
|
||||||
}
|
}
|
||||||
|
if (kernelAbove500()) {
|
||||||
|
u64 result;
|
||||||
|
do {
|
||||||
|
if (R_FAILED(svcGetSystemInfo(&result, 1, 0, 0))) {
|
||||||
|
/* TODO: Panic. */
|
||||||
|
}
|
||||||
|
svcSleepThread(1000000ULL);
|
||||||
|
} while (result);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Handle ResourceLimitUtils::GetResourceLimitHandle(u16 application_type) {
|
Handle ResourceLimitUtils::GetResourceLimitHandle(u16 application_type) {
|
||||||
|
|
Loading…
Reference in a new issue