[CHG] Fix critical bug introduced in 151

This commit is contained in:
csBlueChip 2009-09-05 17:05:31 +00:00
parent 622e74b66c
commit 1c10e17780

View file

@ -53,6 +53,7 @@ int GRRLIB_Init (void) {
// Initialise the video subsystem // Initialise the video subsystem
VIDEO_Init(); VIDEO_Init();
VIDEO_SetBlack(true); // Disable video output during initialisation
// Grab a pointer to the video mode attributes // Grab a pointer to the video mode attributes
if ( !(rmode = VIDEO_GetPreferredMode(NULL)) ) return -1 ; if ( !(rmode = VIDEO_GetPreferredMode(NULL)) ) return -1 ;
@ -82,7 +83,6 @@ int GRRLIB_Init (void) {
if ( !(xfb[1] = MEM_K0_TO_K1(SYS_AllocateFramebuffer(rmode))) ) return -1 ; if ( !(xfb[1] = MEM_K0_TO_K1(SYS_AllocateFramebuffer(rmode))) ) return -1 ;
VIDEO_SetNextFramebuffer(xfb[fb]); // Choose a frame buffer to start with VIDEO_SetNextFramebuffer(xfb[fb]); // Choose a frame buffer to start with
VIDEO_SetBlack(true); // and paint it black
VIDEO_Flush(); // flush the frame to the TV VIDEO_Flush(); // flush the frame to the TV
VIDEO_WaitVSync(); // Wait for the TV to finish updating VIDEO_WaitVSync(); // Wait for the TV to finish updating
@ -158,6 +158,7 @@ int GRRLIB_Init (void) {
// Initialise the filing system // Initialise the filing system
if (!fatInitDefault()) return -2 ; if (!fatInitDefault()) return -2 ;
VIDEO_SetBlack(false); // Enable video output
return 0; return 0;
} }