nn::applet::CTR::IsExpectedToProcessHomeButton Function
bool IsExpectedToProcessHomeButton(
void
);
None.
true, the HOME Button must be processed. Determines whether there has been a request to process the HOME Button.
A return value of true indicates that either the HOME Button was pressed to jump to the HOME Menu, or some other applet made a similar request to jump to the HOME Menu.
In such cases, call the nn::applet::CTR::ProcessHomeButton to process the HOME Button. Then call nn::applet::CTR::WaitForStarting to wait for starting if required.
// HOME Button transition check
if ( applet::IsExpectedToProcessHomeButton() )
{
_save_my_data();
// HOME Button transition process
applet::ProcessHomeButton();
// Wait
applet::WaitForStarting();
if ( applet::IsExpectedToCloseApplication() )
{
_close_application();
}
_recover_my_data();
// Clear HOME Button state
applet::ClearHomeButtonState();
}
CONFIDENTIAL