Skip to content

Commit

Permalink
more or less properly handle HOME exit
Browse files Browse the repository at this point in the history
  • Loading branch information
fgsfdsfgs committed Aug 19, 2019
1 parent b74ee16 commit 0a7bc7e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions source/build/src/sdlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,7 @@ static int nxsock_init = 0;
# endif
extern "C" void userAppInit(void)
{
appletLockExit();
# ifndef NDEBUG
if (R_SUCCEEDED(socketInitializeDefault()))
{
Expand All @@ -370,6 +371,7 @@ extern "C" void userAppExit(void)
socketExit();
}
# endif
appletUnlockExit();
}
#endif // __SWITCH__

Expand Down Expand Up @@ -2288,6 +2290,10 @@ int32_t handleevents_sdlcommon(SDL_Event *ev)
break;

case SDL_QUIT:
#ifdef __SWITCH__
Bexit(0); // bail right here: this is a termination request
// TODO: this is pretty shitty, maybe call G_GameQuit?
#endif
quitevent = 1;
return -1;
}
Expand Down

0 comments on commit 0a7bc7e

Please sign in to comment.