From fec8332df6b818d5d365ca16db2b8efea71215e8 Mon Sep 17 00:00:00 2001 From: Josh Enders Date: Fri, 24 Nov 2023 00:25:02 -0800 Subject: [PATCH] Updates Switch app initialization to disable auto-sleep Disables HOS auto-sleep during app lifetime to prevent sleep from breaking large file transfers --- source/switch/init.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/switch/init.c b/source/switch/init.c index 76cbefa..57bd790 100644 --- a/source/switch/init.c +++ b/source/switch/init.c @@ -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 (); }