Mercurial > sdl-ios-xcode
comparison src/video/fbcon/SDL_fbvideo.c @ 1217:ae9981987c2f
Oops, actually use the timings in the modes db. :)
FIXME: Add some way of specifying the refresh rate we want to select!
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Mon, 02 Jan 2006 09:32:54 +0000 |
parents | d082d2d66ec8 |
children | c9b51268668f |
comparison
equal
deleted
inserted
replaced
1216:f8fc6fdd589d | 1217:ae9981987c2f |
---|---|
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); |