nn::applet::CTR::ProcessHomeButton Function
bool ProcessHomeButton(
void
);
None.
Processes transitions to the HOME Menu.
This function is used to jump to the HOME Menu when this is required by the nn::applet::CTR::IsExpectedToProcessHomeButton function.
The return value indicates whether it is necessary to wait with the nn::applet::CTR::WaitForStarting function after this function is called. If this is true, call the function. If this is false, you do not need to call the function. (Of course, even if you call the function it will simply exit without waiting.)
To ensure mutual exclusion with Sleep Mode, you must call nn::applet::CTR::DisableSleep(true) before calling this function. You must call nn::applet::CTR::EnableSleep(true) after waiting and determining to finish waiting. (Note that the above constraint is particular to the current version and may change in future.)
Example
// HOME Button transition check
if ( applet::IsExpectedToProcessHomeButton() )
{
_save_my_data();
applet::DisableSleep(true);
// HOME Button transition process
applet::ProcessHomeButton();
// Wait
applet::WaitForStarting();
if ( applet::IsExpectedToCloseApplication() )
{
_close_application();
}
applet::EnableSleep(true);
_recover_my_data();
}
Although old versions of the library had the nn::applet::CTR::ProcessHomeButtonIfPrepared function, it has the exact same behavior as this function. Use this function instead.
DisableSleep and EnableSleep functions.ProcessHomeButtonIfPrepared.
CONFIDENTIAL