mirror of
https://github.com/switchbrew/libnx.git
synced 2025-06-22 13:02:38 +02:00
Enter infinite-sleep-loop in appletRequestToShutdown/appletRequestToReboot. Minor change in appletHolderJump.
This commit is contained in:
parent
112da06f37
commit
10e2e71ea2
@ -1199,13 +1199,13 @@ Result appletSetGamePlayRecordingState(bool state);
|
|||||||
Result appletInitializeGamePlayRecording(void);
|
Result appletInitializeGamePlayRecording(void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Requests a system shutdown.
|
* @brief Requests a system shutdown. This will enter an infinite-sleep-loop on success.
|
||||||
* @note Only available with AppletType_*Application on 3.0.0+.
|
* @note Only available with AppletType_*Application on 3.0.0+.
|
||||||
*/
|
*/
|
||||||
Result appletRequestToShutdown(void);
|
Result appletRequestToShutdown(void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Requests a system reboot.
|
* @brief Requests a system reboot. This will enter an infinite-sleep-loop on success.
|
||||||
* @note Only available with AppletType_*Application on 3.0.0+.
|
* @note Only available with AppletType_*Application on 3.0.0+.
|
||||||
*/
|
*/
|
||||||
Result appletRequestToReboot(void);
|
Result appletRequestToReboot(void);
|
||||||
|
@ -2896,9 +2896,7 @@ Result appletHolderJump(AppletHolder *h) {
|
|||||||
|
|
||||||
if (R_SUCCEEDED(rc)) rc = _appletWindAndDoReserved();
|
if (R_SUCCEEDED(rc)) rc = _appletWindAndDoReserved();
|
||||||
|
|
||||||
if (R_FAILED(rc)) return rc;
|
if (R_SUCCEEDED(rc)) while(1)svcSleepThread(86400000000000ULL);
|
||||||
|
|
||||||
while(1)svcSleepThread(86400000000000ULL);
|
|
||||||
|
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
@ -3856,21 +3854,29 @@ Result appletInitializeGamePlayRecording(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Result appletRequestToShutdown(void) {
|
Result appletRequestToShutdown(void) {
|
||||||
|
Result rc=0;
|
||||||
|
|
||||||
if (!serviceIsActive(&g_appletSrv) || !_appletIsApplication())
|
if (!serviceIsActive(&g_appletSrv) || !_appletIsApplication())
|
||||||
return MAKERESULT(Module_Libnx, LibnxError_NotInitialized);
|
return MAKERESULT(Module_Libnx, LibnxError_NotInitialized);
|
||||||
if (hosversionBefore(3,0,0))
|
if (hosversionBefore(3,0,0))
|
||||||
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
|
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
|
||||||
|
|
||||||
return _appletCmdNoIO(&g_appletIFunctions, 70);
|
rc = _appletCmdNoIO(&g_appletIFunctions, 70);
|
||||||
|
if (R_SUCCEEDED(rc)) while(1)svcSleepThread(86400000000000ULL);
|
||||||
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
Result appletRequestToReboot(void) {
|
Result appletRequestToReboot(void) {
|
||||||
|
Result rc=0;
|
||||||
|
|
||||||
if (!serviceIsActive(&g_appletSrv) || !_appletIsApplication())
|
if (!serviceIsActive(&g_appletSrv) || !_appletIsApplication())
|
||||||
return MAKERESULT(Module_Libnx, LibnxError_NotInitialized);
|
return MAKERESULT(Module_Libnx, LibnxError_NotInitialized);
|
||||||
if (hosversionBefore(3,0,0))
|
if (hosversionBefore(3,0,0))
|
||||||
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
|
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
|
||||||
|
|
||||||
return _appletCmdNoIO(&g_appletIFunctions, 71);
|
rc = _appletCmdNoIO(&g_appletIFunctions, 71);
|
||||||
|
if (R_SUCCEEDED(rc)) while(1)svcSleepThread(86400000000000ULL);
|
||||||
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
static Result _appletInitializeApplicationCopyrightFrameBuffer(TransferMemory *tmem, s32 width, s32 height) {
|
static Result _appletInitializeApplicationCopyrightFrameBuffer(TransferMemory *tmem, s32 width, s32 height) {
|
||||||
|
Loading…
Reference in New Issue
Block a user