mirror of
https://github.com/switchbrew/libnx.git
synced 2025-06-30 08:42:40 +02:00
Added appletRequestToShutdown and appletRequestToReboot.
This commit is contained in:
parent
3270bf3996
commit
333de18494
@ -259,6 +259,18 @@ Result appletSetGamePlayRecordingState(bool state);
|
|||||||
/// Only usable when running under a title which supports video recording. Using this is only needed when the host title control.nacp has VideoCaptureMode set to Enabled, with Automatic appletInitializeGamePlayRecording is not needed.
|
/// Only usable when running under a title which supports video recording. Using this is only needed when the host title control.nacp has VideoCaptureMode set to Enabled, with Automatic appletInitializeGamePlayRecording is not needed.
|
||||||
Result appletInitializeGamePlayRecording(void);
|
Result appletInitializeGamePlayRecording(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Requests a system shutdown.
|
||||||
|
* @note Only available with AppletType_*Application on 3.0.0+.
|
||||||
|
*/
|
||||||
|
Result appletRequestToShutdown(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Requests a system reboot.
|
||||||
|
* @note Only available with AppletType_*Application on 3.0.0+.
|
||||||
|
*/
|
||||||
|
Result appletRequestToReboot(void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Gets ApplicationPlayStatistics.
|
* @brief Gets ApplicationPlayStatistics.
|
||||||
* @note Only available with AppletType_*Application on 5.0.0+.
|
* @note Only available with AppletType_*Application on 5.0.0+.
|
||||||
|
@ -1561,6 +1561,24 @@ Result appletInitializeGamePlayRecording(void) {
|
|||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Result appletRequestToShutdown(void) {
|
||||||
|
if (!serviceIsActive(&g_appletSrv) || !_appletIsApplication())
|
||||||
|
return MAKERESULT(Module_Libnx, LibnxError_NotInitialized);
|
||||||
|
if (hosversionBefore(3,0,0))
|
||||||
|
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
|
||||||
|
|
||||||
|
return _appletCmdNoIO(&g_appletIFunctions, 70);
|
||||||
|
}
|
||||||
|
|
||||||
|
Result appletRequestToReboot(void) {
|
||||||
|
if (!serviceIsActive(&g_appletSrv) || !_appletIsApplication())
|
||||||
|
return MAKERESULT(Module_Libnx, LibnxError_NotInitialized);
|
||||||
|
if (hosversionBefore(3,0,0))
|
||||||
|
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
|
||||||
|
|
||||||
|
return _appletCmdNoIO(&g_appletIFunctions, 71);
|
||||||
|
}
|
||||||
|
|
||||||
//Official sw has these under 'pdm'.
|
//Official sw has these under 'pdm'.
|
||||||
Result appletQueryApplicationPlayStatistics(PdmApplicationPlayStatistics *stats, const u64 *titleIDs, s32 count, s32 *total_out) {
|
Result appletQueryApplicationPlayStatistics(PdmApplicationPlayStatistics *stats, const u64 *titleIDs, s32 count, s32 *total_out) {
|
||||||
IpcCommand c;
|
IpcCommand c;
|
||||||
|
Loading…
Reference in New Issue
Block a user