nn::applet::CTR::DisableSleep Function
void DisableSleep(
bool isReplyReject = nn::applet::CTR::REPLY_REJECT_IF_LATER
);
| Name | Description | |
|---|---|---|
| in | isReplyReject | If true, performs applet::ReplySleepQuery(applet::REPLY_REJECT) when a sleep query comes. |
Prohibits sleep mode.
Once you use this function to disable Sleep Mode, all values returned by the application to the sleep query callback (set by nn::applet::CTR::SetSleepQueryCallback) are thereafter handled as REPLY_REJECT.
The system will not transition to sleep if any application or applet returns REPLY_REJECT to a sleep query.
This effectively disables sleep, but note that sleep query callbacks are still called when the system is closed.
The behavior of this function up to this point is always the same, regardless of the argument values it is given.
Specify one of the following as the value for the isReplyReject argument.
| Value | Description | |
|---|---|---|
| true | applet::REPLY_REJECT_IF_LATER | Return REPLY_REJECT to sleep queries. |
false | applet::NO_REPLY_REJECT | Return nothing to sleep queries. |
If true or applet::REPLY_REJECT_IF_LATER and sleep queries are enabled, the application returns REPLY_REJECT to any sleep queries.
If false or applet::NO_REPLY_REJECT, the application does not do this. In other words, the application does nothing regardless of whether sleep queries are enabled.
Specifying true or false for the isReplyReject argument only affects whether the function returns applet::REPLY_REJECT for this single call, and has no effect on any later calls.
CONFIDENTIAL