rosalina: prevent disconnect when shell is closed

Fuck ndm, fuck StreetPass
This commit is contained in:
TuxSH
2020-07-11 21:39:36 +01:00
parent dc67d438dc
commit 4c01bb453c
6 changed files with 30 additions and 3 deletions

View File

@@ -140,7 +140,7 @@ static void handleSleepNotification(u32 notificationId)
switch (notificationId)
{
case PTMNOTIFID_SLEEP_REQUESTED:
PTMSYSM_ReplyToSleepQuery(miniSocEnabled); // deny sleep request if we have network stuff running
PTMSYSM_ReplyToSleepQuery(ROSALINA_PREVENT_DISCONNECT); // deny sleep request if we have network stuff running
break;
case PTMNOTIFID_GOING_TO_SLEEP:
case PTMNOTIFID_SLEEP_ALLOWED:

View File

@@ -91,6 +91,7 @@ Result miniSocInit(void)
svcKernelSetState(0x10000, 2);
miniSocEnabled = true;
ROSALINA_PREVENT_DISCONNECT = true;
return 0;
cleanup:
@@ -134,6 +135,7 @@ Result miniSocExitDirect(void)
{
svcKernelSetState(0x10000, 2);
miniSocEnabled = false;
ROSALINA_PREVENT_DISCONNECT = false;
}
return ret;
}