summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2000-01-07 13:18:39 +0000
committerPascal Rigaux <pixel@mandriva.com>2000-01-07 13:18:39 +0000
commit7a360cc04cea6bd6bc7f00fdfe44ed331c2aa2e3 (patch)
treea9eee02f56672d38a7aaedc66ba8c19aa3be2844
parent4b1e5a783ad0ceab4640d3e0359ed253439b5d3c (diff)
downloaddrakx-backup-do-not-use-7a360cc04cea6bd6bc7f00fdfe44ed331c2aa2e3.tar
drakx-backup-do-not-use-7a360cc04cea6bd6bc7f00fdfe44ed331c2aa2e3.tar.gz
drakx-backup-do-not-use-7a360cc04cea6bd6bc7f00fdfe44ed331c2aa2e3.tar.bz2
drakx-backup-do-not-use-7a360cc04cea6bd6bc7f00fdfe44ed331c2aa2e3.tar.xz
drakx-backup-do-not-use-7a360cc04cea6bd6bc7f00fdfe44ed331c2aa2e3.zip
*** empty log message ***
-rw-r--r--perl-install/Xconfigurator.pm9
1 files changed, 6 insertions, 3 deletions
diff --git a/perl-install/Xconfigurator.pm b/perl-install/Xconfigurator.pm
index 3eb4f470b..43b617965 100644
--- a/perl-install/Xconfigurator.pm
+++ b/perl-install/Xconfigurator.pm
@@ -408,10 +408,10 @@ sub autoDefaultDepth($$) {
}
while (my ($d, $r) = each %{$card->{depth}}) {
- $depth = $depth ? max($depth, $d) : $d;
+ $depth = max($depth || 0, $d);
#- try to have $resolution_wanted
- $best = $best ? max($best, $d) : $d if $r->[0][0] >= $wres_wanted;
+ $best = max($best || 0, $d) if $r->[0][0] >= $wres_wanted;
}
$best || $depth or die "no valid modes";
}
@@ -563,6 +563,9 @@ Try with another video card or monitor")), return;
my $res = $o->{resolution_wanted} || autoDefaultResolution($o->{monitor}{size});
my $wres = first(split 'x', $res);
+
+ #- take the first available resolution <= the wanted resolution
+ $wres = max map { first(grep { $_->[0] <= $wres } @$_)->[0] } values %{$card->{depth}};
my $depth = eval { $card->{default_depth} || autoDefaultDepth($card, $wres) };
$options{auto} or ($depth, $wres) = chooseResolutions($card, $depth, $wres) or return;
@@ -573,7 +576,7 @@ Try with another video card or monitor")), return;
}
#- needed in auto mode when all has been provided by the user
- $card->{depth}{$depth} or die "you fixed an unusable depth";
+ $card->{depth}{$depth} or die "you selected an unusable depth";
#- remove all biggest resolution (keep the small ones for ctl-alt-+)
#- otherwise there'll be a virtual screen :(