1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2<HTML> 3<HEAD> 4<META http-equiv="Content-Type" content="text/html; charset=utf-8"> 5<META name="GENERATOR" content="Microsoft FrontPage 5.0"> 6<META http-equiv="Content-Style-Type" content="text/css"> 7<LINK rel="stylesheet" type="text/css" href="../../CSS/revolution.css"> 8<TITLE>OSSetResetCallback</TITLE> 9</HEAD> 10<BODY> 11<H1>OSSetResetCallback</H1> 12 13<H2>Syntax</H2> 14<dl><dd><pre class="construction"> 15#include <revolution/os.h> 16 17typedef void (*OSResetCallback)(void); 18 19OSResetCallback OSSetResetCallback(OSResetCallback callback); 20</pre></dd></dl> 21 22<H2>Arguments</H2> 23<TABLE class="arguments" border="1" > 24 <TBODY> 25 <TR> 26<TH>callback</TH> 27<TD>Pointer to the callback function called at the time of reset button input.</TD> 28 </TR> 29 </TBODY> 30</TABLE> 31 32<H2>Return Values</H2> 33<P>Returns a pointer to a previously set callback function.</P> 34 35<H2>Description</H2> 36<P>Registers a one-time reset callback. The callback function is called only once when the console's reset button is pressed, and then the callback is automatically unregistered. The callback function must be reinstalled to capture the next RESET Button input.</P> 37 38<P> 39<B>Note:</B></P> 40<UL> 41<LI>The processes to be performed by the application should be as short as possible because the reset callback is called in an interrupt-prohibited state.</LI> 42 43<LI>Pressing RESET does not automatically reset the console hardware. The developer must decide how each game program handles RESET Button input.</LI> 44 45<LI>In some circumstances, the registered callback function is not called even when the conditions are fully met. For more information about when this can occur and a workaround, see <a href="../../nand/intro.html#NAND RW NOTICE">Notes Regarding Read/Writes to Wii Console NAND Memory</a>.</LI> 46</UL> 47 48<P><B>Comment:</B><BR> With the GameCube, applications needed to poll for the state of the reset button after a reset interrupt was detected, but this is not required in the Revolution SDK.</P> 49 50<H2>See Also</H2> 51<P class="reference"> 52<A href="../toc.html#Reset Button" target="contents">Reset Button Functions</A><BR><A href="OSGetResetButtonState.html">OSGetResetButtonState</A> 53</P> 54 55<H2>Revision History</H2> 56<P> 572010/05/28 Added a link for more information to the note regarding the failure to call the registered callback.<BR>2006/08/10 Revised to match Wii reset specifications.<BR>2006/03/01 Initial version.<br> 58</P> 59 60<hr><p>CONFIDENTIAL</p></body> 61</HTML>