summaryrefslogtreecommitdiffstats
path: root/perl-install/Xconfig/monitor.pm
diff options
context:
space:
mode:
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}) {