In memory of Ben “bushing” Byer, who passed away on Monday, February 8th, 2016.

Changes

Jump to navigation Jump to search
48 bytes added ,  18:52, 2 July 2008
m
Added tag source lang="c"
Line 3: Line 3:  
The libogc included in DevkitPPC r15 does this for you with one function call.
 
The libogc included in DevkitPPC r15 does this for you with one function call.
 
Here is the video detect code from the DevKitPro Wii example.
 
Here is the video detect code from the DevKitPro Wii example.
 
+
<source lang="c">
    rmode = VIDEO_GetPreferredMode(NULL);
+
rmode = VIDEO_GetPreferredMode(NULL);
    VIDEO_Configure(rmode);
+
VIDEO_Configure(rmode);
 
+
</source>
 
[http://forum.wiibrew.org/viewtopic.php?t=230 Forum thread]
 
[http://forum.wiibrew.org/viewtopic.php?t=230 Forum thread]
    
===Exit to Loader===
 
===Exit to Loader===
 
It's a good idea to add some way to return to the loader, otherwise you have to reboot you Wii to exit.
 
It's a good idea to add some way to return to the loader, otherwise you have to reboot you Wii to exit.
 
+
<source lang="c">
    // Just call the exit() function to go back to the loader
+
// Just call the exit() function to go back to the loader
    // Returning from main also works, since that calls exit for you
+
// Returning from main also works, since that calls exit for you
    // ....
+
exit(0);
    exit(0);
+
</source>
    
===How to use the Wiimote===
 
===How to use the Wiimote===
Line 22: Line 22:  
===Reboot Wii===
 
===Reboot Wii===
 
Use:
 
Use:
SYS_ResetSystem(SYS_RESTART,0,0);
+
<source lang="c">
 +
SYS_ResetSystem(SYS_RESTART,0,0);
 +
</source>
    
Or use SYS_RETURNTOMENU for a "soft" return to the system menu, SYS_POWEROFF to shut down the wii (automatically to the appropriate Idle or Standby mode, depending on the WC24 setting), or SYS_POWEROFF_STANDBY or _IDLE to specify the mode and override the system setting.
 
Or use SYS_RETURNTOMENU for a "soft" return to the system menu, SYS_POWEROFF to shut down the wii (automatically to the appropriate Idle or Standby mode, depending on the WC24 setting), or SYS_POWEROFF_STANDBY or _IDLE to specify the mode and override the system setting.
3,032

edits

Navigation menu