# HG changeset patch # User Sam Lantinga # Date 1136194374 0 # Node ID ae9981987c2f290ef61c49a3f0beb8acb0ab7028 # Parent f8fc6fdd589d1d88223e7ca3ed1f79dc672eaeac Oops, actually use the timings in the modes db. :) FIXME: Add some way of specifying the refresh rate we want to select! diff -r f8fc6fdd589d -r ae9981987c2f src/video/fbcon/SDL_fbvideo.c --- a/src/video/fbcon/SDL_fbvideo.c Mon Jan 02 09:13:16 2006 +0000 +++ b/src/video/fbcon/SDL_fbvideo.c Mon Jan 02 09:32:54 2006 +0000 @@ -770,10 +770,19 @@ if ( modesdb ) { /* Parse the mode definition file */ while ( read_fbmodes_mode(modesdb, &cinfo) ) { - if ( vinfo->xres == cinfo.xres && - vinfo->yres == cinfo.yres ) { + if ( (vinfo->xres == cinfo.xres && vinfo->yres == cinfo.yres) && + (!matched || (vinfo->bits_per_pixel == cinfo.bits_per_pixel)) ) { + vinfo->pixclock = cinfo.pixclock; + vinfo->left_margin = cinfo.left_margin; + vinfo->right_margin = cinfo.right_margin; + vinfo->upper_margin = cinfo.upper_margin; + vinfo->lower_margin = cinfo.lower_margin; + vinfo->hsync_len = cinfo.hsync_len; + vinfo->vsync_len = cinfo.vsync_len; + if ( matched ) { + break; + } matched = 1; - break; } } fclose(modesdb);