nn::applet::CTR::IsExpectedToProcessHomeButton Function

Syntax

bool IsExpectedToProcessHomeButton(
     void
);

Arguments

None.

Return Values

Returns whether there was a processing request. If true, the HOME Button must be processed.

Description

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();
   }

Revision History

2010/11/10
Initial version.

CONFIDENTIAL