switchbrew / libnx

Library for Switch Homebrew

Home Page:https://switchbrew.github.io/libnx/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

appletLockExit() not working

ThatNerdyPikachu opened this issue · comments

commented

The usage shown here and here does not do anything, am I doing something wrong?

There doesn't seem to be anything post-main-loop that would delay exiting with normal-exit, so ofc it wouldn't be noticeable...

commented

🤔 But the home button is still usable...

What are you saying?

commented

I thought appletLockExit() stopped exiting until unlock was called, no?

appletMainLoop() will return false when locking is enabled & HOME is pressed.

commented

So effectively, the loop will continue?

no

commented

w h a t

so we can only delay home button pressing, not stop it?

You could ignore appletMainLoop() retval in some cases if you really want to, but Home Menu would display a waiting-dialog until main() returns. This is for delaying exit so that the app can do proper cleanup, not block it entirely.

See appletBeginBlockingHomeButton (applet-application-only though).