OSSetPowerCallback

Syntax

#include <revolution/os.h>

typedef void (*OSPowerCallback)(void);

OSPowerCallback OSSetPowerCallback(OSPowerCallback callback);

Arguments

callback Pointer to the callback function called at time of power button input.

Return Values

Returns a pointer to a previously set callback function.

Description

Registers a one-time power button callback. The callback function is called only once when the Power Button on the console is pressed or when the Power Button on the paired Wii Remote is held down, and then callback registration is automatically deleted. In principle, the application receiving the power button callback must execute shutdown procedures within a set amount of time.

Note:

See Also

Reset Button Functions

Revision History

2010/05/28 Added a link for more information to the note regarding the failure to call the registered callback.
2006/08/30 Added a description about the Power Button on the Wii Remote.
2006/08/10 Initial version.


CONFIDENTIAL