equal
deleted
inserted
replaced
768 matched = 0; |
768 matched = 0; |
769 modesdb = fopen(FB_MODES_DB, "r"); |
769 modesdb = fopen(FB_MODES_DB, "r"); |
770 if ( modesdb ) { |
770 if ( modesdb ) { |
771 /* Parse the mode definition file */ |
771 /* Parse the mode definition file */ |
772 while ( read_fbmodes_mode(modesdb, &cinfo) ) { |
772 while ( read_fbmodes_mode(modesdb, &cinfo) ) { |
773 if ( vinfo->xres == cinfo.xres && |
773 if ( (vinfo->xres == cinfo.xres && vinfo->yres == cinfo.yres) && |
774 vinfo->yres == cinfo.yres ) { |
774 (!matched || (vinfo->bits_per_pixel == cinfo.bits_per_pixel)) ) { |
|
775 vinfo->pixclock = cinfo.pixclock; |
|
776 vinfo->left_margin = cinfo.left_margin; |
|
777 vinfo->right_margin = cinfo.right_margin; |
|
778 vinfo->upper_margin = cinfo.upper_margin; |
|
779 vinfo->lower_margin = cinfo.lower_margin; |
|
780 vinfo->hsync_len = cinfo.hsync_len; |
|
781 vinfo->vsync_len = cinfo.vsync_len; |
|
782 if ( matched ) { |
|
783 break; |
|
784 } |
775 matched = 1; |
785 matched = 1; |
776 break; |
|
777 } |
786 } |
778 } |
787 } |
779 fclose(modesdb); |
788 fclose(modesdb); |
780 } |
789 } |
781 return(matched); |
790 return(matched); |