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

Function aptSetSleepAllowed

libctru/source/services/apt.c:268–281  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

266}
267
268void aptSetSleepAllowed(bool allowed)
269{
270 bool cur = aptIsSleepAllowed();
271 if (allowed && !cur)
272 {
273 aptFlags |= FLAG_ALLOWSLEEP;
274 APT_SleepIfShellClosed();
275 }
276 else if (!allowed && cur)
277 {
278 aptFlags &= ~FLAG_ALLOWSLEEP;
279 APT_ReplySleepQuery(envGetAptAppId(), APTREPLY_REJECT);
280 }
281}
282
283bool aptIsHomeAllowed(void)
284{

Callers 3

aptJumpToHomeMenuFunction · 0.85
aptLaunchLibraryAppletFunction · 0.85
aptLaunchSystemAppletFunction · 0.85

Calls 4

aptIsSleepAllowedFunction · 0.85
APT_SleepIfShellClosedFunction · 0.85
APT_ReplySleepQueryFunction · 0.85
envGetAptAppIdFunction · 0.85

Tested by

no test coverage detected