src/video/fbcon/SDL_fbvideo.c
changeset 1217 ae9981987c2f
parent 1215 d082d2d66ec8
child 1312 c9b51268668f
     1.1 --- a/src/video/fbcon/SDL_fbvideo.c	Mon Jan 02 09:13:16 2006 +0000
     1.2 +++ b/src/video/fbcon/SDL_fbvideo.c	Mon Jan 02 09:32:54 2006 +0000
     1.3 @@ -770,10 +770,19 @@
     1.4  	if ( modesdb ) {
     1.5  		/* Parse the mode definition file */
     1.6  		while ( read_fbmodes_mode(modesdb, &cinfo) ) {
     1.7 -			if ( vinfo->xres == cinfo.xres &&
     1.8 -			     vinfo->yres == cinfo.yres ) {
     1.9 +			if ( (vinfo->xres == cinfo.xres && vinfo->yres == cinfo.yres) &&
    1.10 +			     (!matched || (vinfo->bits_per_pixel == cinfo.bits_per_pixel)) ) {
    1.11 +				vinfo->pixclock = cinfo.pixclock;
    1.12 +				vinfo->left_margin = cinfo.left_margin;
    1.13 +				vinfo->right_margin = cinfo.right_margin;
    1.14 +				vinfo->upper_margin = cinfo.upper_margin;
    1.15 +				vinfo->lower_margin = cinfo.lower_margin;
    1.16 +				vinfo->hsync_len = cinfo.hsync_len;
    1.17 +				vinfo->vsync_len = cinfo.vsync_len;
    1.18 +				if ( matched ) {
    1.19 +					break;
    1.20 +				}
    1.21  				matched = 1;
    1.22 -				break;
    1.23  			}
    1.24  		}
    1.25  		fclose(modesdb);