diff options
author | Pascal Rigaux <pixel@mandriva.com> | 1999-09-16 17:30:46 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 1999-09-16 17:30:46 +0000 |
commit | 81068b4c188a82c0ae486665617f385997e619cd (patch) | |
tree | 485035ca8ecab31f9012e5b38c59c25434a0b676 /perl-install/Xconfig.pm | |
parent | 1609027e73313dc16a5109e3d3f56d6b1c9b20ad (diff) | |
download | drakx-backup-do-not-use-81068b4c188a82c0ae486665617f385997e619cd.tar drakx-backup-do-not-use-81068b4c188a82c0ae486665617f385997e619cd.tar.gz drakx-backup-do-not-use-81068b4c188a82c0ae486665617f385997e619cd.tar.bz2 drakx-backup-do-not-use-81068b4c188a82c0ae486665617f385997e619cd.tar.xz drakx-backup-do-not-use-81068b4c188a82c0ae486665617f385997e619cd.zip |
no_comment
Diffstat (limited to 'perl-install/Xconfig.pm')
-rw-r--r-- | perl-install/Xconfig.pm | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/perl-install/Xconfig.pm b/perl-install/Xconfig.pm index e22168377..acab3ca55 100644 --- a/perl-install/Xconfig.pm +++ b/perl-install/Xconfig.pm @@ -95,8 +95,20 @@ sub getinfoFromDDC { my $o = shift || {}; my $O = $o->{monitor} ||= {}; return $o if $O->{hsyncrange} && $O->{vsyncrange} && $O->{modelines}; - my ($h, $v, @l) = `ddcxinfo`; + my ($m, @l) = `ddcxinfos`; $? == 0 or return $o; + + $o->{card}{memory} = to_int($m); + while (($_ = shift @l) ne "\n") { + my ($depth, $x, $y) = split; + $depth = int(log($depth) / log(2)); + if ($depth >= 8 && $x >= 640) { + push @{$o->{card}{depth}{$depth}}, [ $x, $y ]; + push @{$o->{card}{depth}{32}}, [ $x, $y ] if $depth == 24; + } + } + my ($h, $v, @m) = @l; + chop $h; chop $v; $O->{hsyncrange} ||= $h; $O->{vsyncrange} ||= $v; |