mirror of
https://github.com/switchbrew/libnx.git
synced 2025-06-22 04:52:39 +02:00
Enter an infinite-sleep-loop in _appletExitProcess when the exit cmds were successful, this is used with __nx_applet_exit_mode handling. Minor other changes.
This commit is contained in:
parent
10e2e71ea2
commit
287bb00981
@ -29,6 +29,7 @@ static Service g_appletSrv;
|
|||||||
static Service g_appletProxySession;
|
static Service g_appletProxySession;
|
||||||
static u64 g_refCnt;
|
static u64 g_refCnt;
|
||||||
static bool g_appletExitProcessFlag;
|
static bool g_appletExitProcessFlag;
|
||||||
|
static Result g_appletExitProcessResult;
|
||||||
|
|
||||||
// From Get*Functions.
|
// From Get*Functions.
|
||||||
static Service g_appletIAppletCommonFunctions;
|
static Service g_appletIAppletCommonFunctions;
|
||||||
@ -345,6 +346,8 @@ Result appletInitialize(void)
|
|||||||
static void NORETURN _appletExitProcess(int result_code) {
|
static void NORETURN _appletExitProcess(int result_code) {
|
||||||
appletExit();
|
appletExit();
|
||||||
|
|
||||||
|
if (R_SUCCEEDED(g_appletExitProcessResult)) while(1)svcSleepThread(86400000000000ULL);
|
||||||
|
|
||||||
svcExitProcess();
|
svcExitProcess();
|
||||||
__builtin_unreachable();
|
__builtin_unreachable();
|
||||||
}
|
}
|
||||||
@ -381,12 +384,10 @@ void appletExit(void)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (_appletIsApplication()) {
|
if (_appletIsApplication())
|
||||||
//appletSetTerminateResult(0);
|
g_appletExitProcessResult = _appletSelfExit();
|
||||||
_appletSelfExit();
|
|
||||||
}
|
|
||||||
if (__nx_applet_type == AppletType_LibraryApplet)
|
if (__nx_applet_type == AppletType_LibraryApplet)
|
||||||
_appletExitProcessAndReturn();
|
g_appletExitProcessResult = _appletExitProcessAndReturn();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user