Skip to content

Commit

Permalink
Fixed trashing the framebuffer console on broken video drivers
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Sep 2, 2002
1 parent c513cb6 commit 715aa48
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/video/fbcon/SDL_fbvideo.c
Expand Up @@ -463,6 +463,9 @@ static int FB_VideoInit(_THIS, SDL_PixelFormat *vformat)
current_w = vinfo.xres;
current_h = vinfo.yres;
current_index = ((vinfo.bits_per_pixel+7)/8)-1;
#ifdef BROKEN_MODES
FB_AddMode(this, current_index, current_w, current_h);
#else
for ( i=0; i<NUM_MODELISTS; ++i ) {
SDL_nummodes[i] = 0;
SDL_modelist[i] = NULL;
Expand All @@ -475,7 +478,7 @@ static int FB_VideoInit(_THIS, SDL_PixelFormat *vformat)
if ( i == current_index ) {
if ( (current_w > w) || (current_h > h) ) {
/* Only check once */
FB_AddMode(this, i,current_w,current_h);
FB_AddMode(this, i, current_w, current_h);
current_index = -1;
}
}
Expand All @@ -484,6 +487,7 @@ static int FB_VideoInit(_THIS, SDL_PixelFormat *vformat)
}
}
}
#endif /* BROKEN_MODES */

/* Fill in our hardware acceleration capabilities */
this->info.wm_available = 0;
Expand Down

0 comments on commit 715aa48

Please sign in to comment.