From aee272f0a5ccefa4009f19f87a464fe58a0f236f Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Mon, 2 Sep 2002 21:42:15 +0000 Subject: [PATCH] Fixed trashing the framebuffer console on broken video drivers --HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40488 --- src/video/fbcon/SDL_fbvideo.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/video/fbcon/SDL_fbvideo.c b/src/video/fbcon/SDL_fbvideo.c index a743f820a..d1a5a495c 100644 --- a/src/video/fbcon/SDL_fbvideo.c +++ b/src/video/fbcon/SDL_fbvideo.c @@ -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 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; } } @@ -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;