summaryrefslogtreecommitdiffstats
path: root/perl-install/Xconfig.pm
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2000-01-07 13:27:53 +0000
committerFrancois Pons <fpons@mandriva.com>2000-01-07 13:27:53 +0000
commit1044ef768e3f4abd181a6872e77b628062b57a79 (patch)
tree6dfd8f1060a1663d59735639eaf3b5f2f9889255 /perl-install/Xconfig.pm
parentb1edad2f776716889ca148f621f0aeed971c18e3 (diff)
downloaddrakx-1044ef768e3f4abd181a6872e77b628062b57a79.tar
drakx-1044ef768e3f4abd181a6872e77b628062b57a79.tar.gz
drakx-1044ef768e3f4abd181a6872e77b628062b57a79.tar.bz2
drakx-1044ef768e3f4abd181a6872e77b628062b57a79.tar.xz
drakx-1044ef768e3f4abd181a6872e77b628062b57a79.zip
*** empty log message ***
Diffstat (limited to 'perl-install/Xconfig.pm')
-rw-r--r--perl-install/Xconfig.pm11
1 files changed, 5 insertions, 6 deletions
diff --git a/perl-install/Xconfig.pm b/perl-install/Xconfig.pm
index 71a75cc67..8e31ed4af 100644
--- a/perl-install/Xconfig.pm
+++ b/perl-install/Xconfig.pm
@@ -77,26 +77,25 @@ sub getinfoFromXF86Config {
} elsif (my $s = /^Section "Screen"/ .. /^EndSection/) {
undef $driver if $s == 1;
$driver = $1 if /^\s*Driver\s+"(.*?)"/;
- #- print "($driver eq $Xconfigurator::serversdriver{$o->{card}{server}})";
- if ($driver eq $Xconfigurator::serversdriver{$o->{card}{server}}) { #- take into account the right screen section for the server.
+ if ($driver eq $Xconfigurator::serversdriver{$o->{card}{server}}) {
$o->{card}{default_depth} ||= $1 if /^\s*DefaultColorDepth\s+(\d+)/;
if (my $i = /^\s*Subsection\s+"Display"/ .. /^\s*EndSubsection/) {
undef $depth if $i == 1;
$depth = $1 if /^\s*Depth\s+(\d*)/;
if (/^\s*Modes\s+(.*)/) {
my $a = 0;
- push @{$o->{card}{depth}{$depth || 8}},
+ unshift @{$o->{card}{depth}{$depth || 8} ||= []}, #- insert at the beginning for resolution_wanted!
grep { $_->[0] >= 640 } map { [ /"(\d+)x(\d+)"/ ] } split ' ', $1;
}
}
}
}
}
- #- get the default resolution.
+ #- get the default resolution according the the current file.
my @depth = keys %{$o->{card}{depth}};
$o->{resolution_wanted} ||=
- $o->{card}{depth}{$o->{card}{default_depth} || $depth[0]}[0][0] . "x" .
- $o->{card}{depth}{$o->{card}{default_depth} || $depth[0]}[0][1];
+ ($o->{card}{depth}{$o->{card}{default_depth} || $depth[0]}[0][0]) . "x" .
+ ($o->{card}{depth}{$o->{card}{default_depth} || $depth[0]}[0][1]);
$o;
}