MCPcopy Create free account
hub / github.com/devkitPro/libctru / aptLaunchSystemApplet

Function aptLaunchSystemApplet

libctru/source/services/apt.c:912–936  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

910}
911
912void aptLaunchSystemApplet(NS_APPID appId, void* buf, size_t bufsize, Handle handle)
913{
914 bool sleep = aptIsSleepAllowed();
915
916 aptSetSleepAllowed(false);
917 aptFlags &= ~FLAG_SPURIOUS; // If we haven't received a spurious wakeup by now, we probably never will (see aptInit)
918 APT_PrepareToStartSystemApplet(appId);
919 aptSetSleepAllowed(sleep);
920
921 aptCallHook(APTHOOK_ONSUSPEND);
922
923 GSPGPU_SaveVramSysArea();
924 aptDspSleep();
925 GSPGPU_ReleaseRight();
926
927 aptSetSleepAllowed(false);
928 APT_StartSystemApplet(appId, buf, bufsize, handle);
929 aptFlags &= ~FLAG_ACTIVE;
930
931 aptScreenTransfer(appId, true);
932
933 aptWaitForWakeUp(TR_SYSAPPLET);
934 memcpy(buf, aptParameters, bufsize);
935 aptSetSleepAllowed(sleep);
936}
937
938Result APT_GetLockHandle(u16 flags, Handle* lockHandle)
939{

Callers

nothing calls this directly

Calls 10

aptIsSleepAllowedFunction · 0.85
aptSetSleepAllowedFunction · 0.85
aptCallHookFunction · 0.85
GSPGPU_SaveVramSysAreaFunction · 0.85
GSPGPU_ReleaseRightFunction · 0.85
APT_StartSystemAppletFunction · 0.85
aptScreenTransferFunction · 0.85
aptWaitForWakeUpFunction · 0.85
aptDspSleepFunction · 0.70

Tested by

no test coverage detected