From 7c32cf9c3f2c6ad9884716f67aee1a2979812de9 Mon Sep 17 00:00:00 2001 From: Francois Pons Date: Thu, 18 Nov 1999 17:21:44 +0000 Subject: *** empty log message *** --- perl-install/Xconfigurator.pm | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) (limited to 'perl-install/Xconfigurator.pm') diff --git a/perl-install/Xconfigurator.pm b/perl-install/Xconfigurator.pm index 3f8b7027c..cdedd020e 100644 --- a/perl-install/Xconfigurator.pm +++ b/perl-install/Xconfigurator.pm @@ -120,13 +120,14 @@ sub rewriteInittab { sub keepOnlyLegalModes { my ($card, $monitor) = @_; - my $mem = 1024 * ($card->{memory} || 99999); + my $mem = 1024 * ($card->{memory} || ($card->{server} eq 'FBDev' ? 2048 : 99999)); my $hsync = max(split(/[,-]/, $monitor->{hsyncrange})); while (my ($depth, $res) = each %{$card->{depth}}) { @$res = grep { $mem >= product(@$_, $depth / 8) && - $hsync >= ($min_hsync4wres{$_->[0]} || 0) + $hsync >= ($min_hsync4wres{$_->[0]} || 0) && + ($card->{server} ne 'FBDev' || $vgamodes{"$_->[0]x$_->[1]x$depth"}) } @$res; delete $card->{depth}{$depth} if @$res == 0; } @@ -387,17 +388,17 @@ sub autoDefaultDepth($$) { my ($card, $wres_wanted) = @_; my ($best, $depth); -# if ($card->{server} eq 'FBDev') { -# 16; #- assume 16 bits depth for this case. -# } else { - while (my ($d, $r) = each %{$card->{depth}}) { - $depth = $depth ? max($depth, $d) : $d; + if ($card->{server} eq 'FBDev') { + return 16; #- this should work by default, FBDev is allowed only if install currently uses it at 16bpp. + } - # try to have $resolution_wanted - $best = $best ? max($best, $d) : $d if $r->[0][0] >= $wres_wanted; - } - $best || $depth or die "no valid modes"; -# } + while (my ($d, $r) = each %{$card->{depth}}) { + $depth = $depth ? max($depth, $d) : $d; + + #- try to have $resolution_wanted + $best = $best ? max($best, $d) : $d if $r->[0][0] >= $wres_wanted; + } + $best || $depth or die "no valid modes"; } sub autoDefaultResolution(;$) { -- cgit v1.2.1