Updates Switch app initialization to disable auto-sleep

Disables HOS auto-sleep during app lifetime to prevent sleep from breaking large file transfers
This commit is contained in:
Josh Enders 2023-11-24 00:25:02 -08:00 committed by mtheall
parent e27898f0c3
commit fec8332df6

View File

@ -53,6 +53,8 @@ void userAppInit ()
{
// disable immediate app close
appletLockExit ();
// disable auto-sleep
appletSetAutoSleepDisabled (true);
romfsInit ();
plInitialize (PlServiceType_User);
@ -80,5 +82,7 @@ void userAppExit ()
psmExit ();
plExit ();
romfsExit ();
// Restore auto-sleep
appletSetAutoSleepDisabled (false);
appletUnlockExit ();
}