changeset 487:414d77a36716

Fixed trashing the framebuffer console on broken video drivers
author Sam Lantinga <slouken@libsdl.org>
date Mon, 02 Sep 2002 21:42:15 +0000
parents 8b1c1ae7af11
children 0a111805b53a
files src/video/fbcon/SDL_fbvideo.c
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/video/fbcon/SDL_fbvideo.c	Mon Sep 02 16:02:17 2002 +0000
+++ b/src/video/fbcon/SDL_fbvideo.c	Mon Sep 02 21:42:15 2002 +0000
@@ -463,6 +463,9 @@
 	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;
@@ -475,7 +478,7 @@
 			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;
 				}
 			}
@@ -484,6 +487,7 @@
 			}
 		}
 	}
+#endif /* BROKEN_MODES */
 
 	/* Fill in our hardware acceleration capabilities */
 	this->info.wm_available = 0;