Added appletPrepareForJit.

This commit is contained in:
yellows8 2019-08-21 12:14:29 -04:00
parent c3b32581c9
commit 79e6db16be
No known key found for this signature in database
GPG Key ID: 0AF90DA3F1E60E43
2 changed files with 16 additions and 0 deletions

View File

@ -1354,6 +1354,13 @@ Result appletQueryApplicationPlayStatisticsByUid(u128 userID, PdmApplicationPlay
*/ */
Result appletGetGpuErrorDetectedSystemEvent(Event *out_event); Result appletGetGpuErrorDetectedSystemEvent(Event *out_event);
/**
* @brief Launches the jit-sysmodule when it was not previously launched by this cmd. Returns 0 when it was previously launched.
* @note Only available with AppletType_*Application on [5.0.0+].
* @note Requires the jit-sysmodule to actually be installed.
*/
Result appletPrepareForJit(void);
// IHomeMenuFunctions // IHomeMenuFunctions
/** /**

View File

@ -4287,6 +4287,15 @@ Result appletGetGpuErrorDetectedSystemEvent(Event *out_event) {
return _appletGetEvent(&g_appletIFunctions, out_event, 130, false); return _appletGetEvent(&g_appletIFunctions, out_event, 130, false);
} }
Result appletPrepareForJit(void) {
if (!serviceIsActive(&g_appletSrv) || !_appletIsApplication())
return MAKERESULT(Module_Libnx, LibnxError_NotInitialized);
if (hosversionBefore(5,0,0))
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
return _appletCmdNoIO(&g_appletIFunctions, 1001);
}
// IHomeMenuFunctions // IHomeMenuFunctions
Result appletRequestToGetForeground(void) { Result appletRequestToGetForeground(void) {