summaryrefslogtreecommitdiffstats
path: root/perl-install/Xconfig/monitor.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2005-03-01 11:26:17 +0000
committerPascal Rigaux <pixel@mandriva.com>2005-03-01 11:26:17 +0000
commit53c6afea2261f2665780ef3164f1da06f7f0f080 (patch)
tree3960ae5d8c53c9a4ff141f35e64f144883dfa390 /perl-install/Xconfig/monitor.pm
parent62cf4bce1cc9bc80d585bf7f9c9d7434becefcdd (diff)
downloaddrakx-53c6afea2261f2665780ef3164f1da06f7f0f080.tar
drakx-53c6afea2261f2665780ef3164f1da06f7f0f080.tar.gz
drakx-53c6afea2261f2665780ef3164f1da06f7f0f080.tar.bz2
drakx-53c6afea2261f2665780ef3164f1da06f7f0f080.tar.xz
drakx-53c6afea2261f2665780ef3164f1da06f7f0f080.zip
create {preferred_resolution} out of the edid detailed_timings and use it
Diffstat (limited to 'perl-install/Xconfig/monitor.pm')
-rw-r--r--perl-install/Xconfig/monitor.pm9
1 files changed, 7 insertions, 2 deletions
diff --git a/perl-install/Xconfig/monitor.pm b/perl-install/Xconfig/monitor.pm
index 964380899..d84a5a0a5 100644
--- a/perl-install/Xconfig/monitor.pm
+++ b/perl-install/Xconfig/monitor.pm
@@ -178,10 +178,15 @@ sub getinfoFromDDC() {
$monitor->{VideoRam_probed} = $1;
}
$monitor->{ModeLine} = Xconfig::xfree::default_ModeLine();
- foreach (@{$monitor->{detailed_timings} || []}) {
- next if $_->{bad_ratio};
+ my $detailed_timings = $monitor->{detailed_timings} || [];
+ foreach (grep { !$_->{bad_ratio} } @$detailed_timings) {
unshift @{$monitor->{ModeLine}},
{ val => $_->{ModeLine}, pre_comment => $_->{ModeLine_comment} . "\n" };
+
+ if (@$detailed_timings == 1) {
+ #- should we care about {has_preferred_timing} ?
+ $monitor->{preferred_resolution} = { X => $_->{horizontal_active}, Y => $_->{vertical_active} };
+ }
}
if ($monitor->{EISA_ID}) {