nn::applet::CTR::ClearHomeButtonState Function
void ClearHomeButtonState(
void
);
None.
Clears the HOME Button state.
This clears the value obtained by calling the nn::applet::CTR::GetHomeButtonState function. In other words, it sets the state value to nn::applet::CTR::HOME_BUTTON_NONE.
This function also serves to notify the system of the end of exclusive control between the HOME Button transition and the POWER Button or Sleep Mode transitions.
This function must therefore be called after control returns to the application from the nn::applet::CTR::WaitForStarting function. However, the application does not need to call this function because nn::applet::CTR::WaitForStarting does.
Call this function when a HOME Button press is detected but not processed while the HOME Button is prohibited (disabled).
Example
// HOME Button transition check
if ( applet::IsExpectedToProcessHomeButton() )
{
// When the HOME Button transition is prohibited (disabled)
if ( _is_suppressed_home_button() )
{
applet::ClearHomeButtonState();
}
else
{
WaitForStarting();
if ( applet::IsExpectedToCloseApplication() )
{
_close_application();
}
}
}
CONFIDENTIAL