nn::applet::CTR::GetHomeButtonState FunctionAppletHomeButtonState GetHomeButtonState( void );
None.
Gets the state of the HOME Button.
This function can obtain the following values.
| Value | Description |
|---|---|
| nn::applet::CTR::HOME_BUTTON_NONE | Normal Use |
| nn::applet::CTR::HOME_BUTTON_SINGLE_PRESSED | Single button press detected. |
| nn::applet::CTR::HOME_BUTTON_DOUBLE_PRESSED | Double 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.
CONFIDENTIAL