Line 52:
Line 52:
This is just a way of doing this stuff, feel free to change the code.
This is just a way of doing this stuff, feel free to change the code.
<source lang="c">
<source lang="c">
−
u8 HWButton = 0;
+
s8 HWButton = -1;
/**
/**
Line 96:
Line 96:
{
{
// Do Stuff Here
// Do Stuff Here
−
if(HWButton)
+
if(HWButton != -1)
break;
break;
}
}
−
if(HWButton)
+
if(HWButton != -1)
{
{
SYS_ResetSystem(HWButton, 0, 0);
SYS_ResetSystem(HWButton, 0, 0);
Line 107:
Line 107:
return 0;
return 0;
}
}
+
</source>
+
Possible values for HWButton are:
+
<source lang="c">
+
#define SYS_RESTART 0 /*!< Reboot the gamecube, force, if necessary, to boot the IPL menu. Cold reset is issued */
+
#define SYS_HOTRESET 1 /*!< Restart the application. Kind of softreset */
+
#define SYS_SHUTDOWN 2 /*!< Shutdown the thread system, card management system etc. Leave current thread running and return to caller */
+
#define SYS_RETURNTOMENU 3 /*!< Directly load the Wii Channels menu, without actually cold-resetting the system */
+
#define SYS_POWEROFF 4 /*!< Powers off the Wii, automatically choosing Standby or Idle mode depending on the user's configuration */
+
#define SYS_POWEROFF_STANDBY 5 /*!< Powers off the Wii to standby (red LED, WC24 off) mode. */
+
#define SYS_POWEROFF_IDLE 6 /*!< Powers off the Wii to idle (yellow LED, WC24 on) mode. */
</source>
</source>