SetPowerButtonCallback

nn::applet::CTR::SetPowerButtonCallback Function

Syntax

void SetPowerButtonCallback(
     AppletPowerButtonCallback callback,
     uptr arg = 0
);

Parameters

Name Description
in callback Callback.
in arg Callback arguments.

Return Values

None.

Description

Sets the callback invoked when POWER is pressed.

This sets the callback that is called when POWER is pressed for just a short time.

A number of applet functions will not end until the process has left the callback, so promptly end the callback to reduce the risk of deadlock.

The application must close after the POWER Button is pressed. Call the nn::applet::CTR::IsExpectedToCloseApplication function to check if the application must close.

Revision History

2011/02/17
Added a note about the callback.
2010/11/10
Initial version.

CONFIDENTIAL