nn::applet::CTR::GetHomeButtonState Function

Syntax

AppletHomeButtonState GetHomeButtonState(
     void
);

Arguments

None.

Return Values

Returns the state.

Description

Gets the state of the HOME Button.

This function can obtain the following values.

ValueDescription
nn::applet::CTR::HOME_BUTTON_NONENormal Use
nn::applet::CTR::HOME_BUTTON_SINGLE_PRESSEDSingle button press detected.
nn::applet::CTR::HOME_BUTTON_DOUBLE_PRESSEDDouble button press detected.

For any state other than nn::applet::CTR::HOME_BUTTON_NONE, you must call the nn::applet::CTR::ProcessHomeButton function after the application has run the necessary processing.

However, do not use this function's return value directly to determine if HOME Button processing is required. For that purpose, call the nn::applet::CTR::IsExpectedToProcessHomeMenu function instead. This takes into account not only the importance of transitioning to the HOME Menu because of a HOME Button press but also similar requests to transition to the HOME Menu from other applets.

Once the state value changes to something other than nn::applet::CTR::HOME_BUTTON_NONE, it stays in that state until you clear this by calling the nn::applet::CTR::ClearHomeButtonState function.(The nn::applet::CTR::ClearHomeButtonState function sets the state back to applet::HOME_BUTTON_NONE.

You can determine from the state whether the HOME Button was single- or double-clicked, but behavior is currently the same no matter the value.

Revision History

2010/12/01
Added details.
2010/11/10
Initial version.

CONFIDENTIAL