diff options
author | Pascal Rigaux <pixel@mandriva.com> | 1999-12-27 12:30:43 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 1999-12-27 12:30:43 +0000 |
commit | 8ec6ca4926221d4a8cf1f4dfb10ada2c601dcdfe (patch) | |
tree | 354a4e9ea472441ee66030a40fbe7663f6c33f8e /perl-install/Xconfigurator.pm | |
parent | b11df6721a25cda20db0230ccb913621559199b7 (diff) | |
download | drakx-8ec6ca4926221d4a8cf1f4dfb10ada2c601dcdfe.tar drakx-8ec6ca4926221d4a8cf1f4dfb10ada2c601dcdfe.tar.gz drakx-8ec6ca4926221d4a8cf1f4dfb10ada2c601dcdfe.tar.bz2 drakx-8ec6ca4926221d4a8cf1f4dfb10ada2c601dcdfe.tar.xz drakx-8ec6ca4926221d4a8cf1f4dfb10ada2c601dcdfe.zip |
no_comment
Diffstat (limited to 'perl-install/Xconfigurator.pm')
-rw-r--r-- | perl-install/Xconfigurator.pm | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/perl-install/Xconfigurator.pm b/perl-install/Xconfigurator.pm index 83ec2f678..c25b9ac9a 100644 --- a/perl-install/Xconfigurator.pm +++ b/perl-install/Xconfigurator.pm @@ -411,9 +411,10 @@ sub autoDefaultDepth($$) { $best || $depth or die "no valid modes"; } -sub autoDefaultResolution(;$) { - my $size = round(shift || 14); #- assume a small monitor (size is in inch) - $monitorSize2resolution[$size] || +sub autoDefaultResolution { + my ($size, $isLaptop) = @_; + !$size && $isLaptop and return "1024x768"; + $monitorSize2resolution[round($size || 14)] || #- assume a small monitor (size is in inch) $monitorSize2resolution[-1]; #- no corresponding resolution for this size. It means a big monitor, take biggest we have } @@ -554,7 +555,7 @@ Try with another video card or monitor")), return; #- remove unusable resolutions (based on the video memory size and the monitor hsync rate) keepOnlyLegalModes($card, $o->{monitor}); - my $res = $o->{resolution_wanted} || autoDefaultResolution($o->{monitor}{size}); + my $res = $o->{resolution_wanted} || autoDefaultResolution($o->{monitor}{size}, ); my $wres = first(split 'x', $res); my $depth = eval { $card->{default_depth} || autoDefaultDepth($card, $wres) }; @@ -746,7 +747,7 @@ sub show_info { #- Program entry point. sub main { my ($o, $allowFB); - ($prefix, $o, $in, $allowFB, $install) = @_; + ($prefix, $o, $in, $allowFB, $isLaptop, $install) = @_; $o ||= {}; XF86check_link(); @@ -758,7 +759,7 @@ sub main { $o->{monitor} = monitorConfiguration($o->{monitor}, $o->{card}{server} eq 'FBDev'); } - my $ok = resolutionsConfiguration($o, auto => $::auto, noauto => $::noauto); + my $ok = resolutionsConfiguration($o, auto => $::auto, noauto => $::noauto, isLaptop => $isLaptop); $ok &&= testFinalConfig($o, $::auto, $::skiptest); |