nn::applet::CTR::GetHomeButtonState Function

Syntax

AppletHomeButtonState GetHomeButtonState(
     void
);

Parameters

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-click detected. (See Note 1.)

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::IsExpectedToProcessHomeButton 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.

Note 1:

In CTR SDK 4.0 and later versions, the double-click is no longer returned. No matter how the button is pressed, the information is returned as a single button press. The double-click definition remains for purposes of compatibility, but in the future might be deleted.

Revision History

2012/02/01
Noted that in CTR SDK 4.0 and later versions the double-click is no longer returned.
2010/12/01
Added details.
2010/11/10
Initial version.

CONFIDENTIAL