Line 1: |
Line 1: |
− | Seems to be a bug in the console. This is not a matter of the TV, the first line is never displayed no matter how much yoffset, you have to always printf \n at the start.
| + | [[Category:Deutschsprachiger]] |
| + | |
| + | The first line of the console is never displayed, it seems to be a bug in the console. |
| + | This is not a matter of the TV overscan, the first line is never displayed no matter how much yoffset, you have to always printf \n at the start!? |
| + | |
| <source lang="c"> | | <source lang="c"> |
| #include <stdio.h> | | #include <stdio.h> |
Line 8: |
Line 12: |
| #include <gccore.h> | | #include <gccore.h> |
| #include <wiiuse/wpad.h> | | #include <wiiuse/wpad.h> |
− |
| |
| | | |
| static void *xfb = NULL; | | static void *xfb = NULL; |
Line 31: |
Line 34: |
| VIDEO_Flush(); | | VIDEO_Flush(); |
| VIDEO_WaitVSync(); | | VIDEO_WaitVSync(); |
− | if (rmode->viTVMode&VI_NON_INTERLACE) | + | if (rmode->viTVMode&VI_NON_INTERLACE) { |
− | {
| |
| VIDEO_WaitVSync(); | | VIDEO_WaitVSync(); |
| } | | } |
Line 48: |
Line 50: |
| | | |
| int h; | | int h; |
− | for (h=4;h<rows;h++) | + | for (h=4;h<rows;h++) { |
− | {
| |
| // printf("%2d\n",h); | | // printf("%2d\n",h); |
| printf("%2d 45678-1123456789212345678-312345678-412345678-512345678-612345678-7\n",h); | | printf("%2d 45678-1123456789212345678-312345678-412345678-512345678-612345678-7\n",h); |
Line 67: |
Line 68: |
| WPAD_ReadPending(WPAD_CHAN_ALL, 0 /*countevs*/); | | WPAD_ReadPending(WPAD_CHAN_ALL, 0 /*countevs*/); |
| res = WPAD_Probe(0, &type); | | res = WPAD_Probe(0, &type); |
− | if (res == WPAD_ERR_NONE) | + | if (res == WPAD_ERR_NONE) { |
− | {
| |
| wd = WPAD_Data(0); | | wd = WPAD_Data(0); |
− | if (wd->btns_h & WPAD_BUTTON_HOME) | + | if (wd->btns_h & WPAD_BUTTON_HOME) { |
− | {
| |
| dohome = 1; | | dohome = 1; |
| } | | } |
Line 80: |
Line 79: |
| | | |
| printf("Exiting...\n"); | | printf("Exiting...\n"); |
− | /*
| |
− | if (dooff) SYS_ResetSystem(SYS_POWEROFF,0,0);
| |
| exit(0); exit to loader | | exit(0); exit to loader |
− | SYS_ResetSystem(SYS_RETURNTOMENU,0,0);
| |
− | SYS_RESTART reboot wii
| |
− | 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)
| |
− | */
| |
| return 0; | | return 0; |
| } | | } |
| </source> | | </source> |