diff options
-rw-r--r-- | NEWS | 4 | ||||
-rwxr-xr-x | monitor-edid | 7 |
2 files changed, 8 insertions, 3 deletions
@@ -33,6 +33,10 @@ multiple methods o allow retrieval of multiple EDIDs via VBE +- monitor-edid: + o add --first support for stopping processing after one EDID has been + found + Version 2.5 - 18 October 2009, by Anssi Hannula - monitor-probe-using-X: diff --git a/monitor-edid b/monitor-edid index 4133082..a59226f 100755 --- a/monitor-edid +++ b/monitor-edid @@ -32,12 +32,12 @@ if ($0 =~ /monitor-get-edid/) { exit 1; } } else { - GetOptions_(@common_options, 'MonitorsDB', 'perl') - or die "usage: monitor-edid $common_options_usage [--perl] [--MonitorsDB]\n"; + GetOptions_(@common_options, 'first', 'MonitorsDB', 'perl') + or die "usage: monitor-edid $common_options_usage [--first] [--perl] [--MonitorsDB]\n"; my $err = 1; - if (my @edids = get_edids()) { + if (my @edids = get_edids($opt{first})) { print "(\n" if $opt{perl}; foreach (@edids) { my ($f, $edid) = @$_; @@ -99,6 +99,7 @@ sub get_edids { next if grep { $_->[1] eq $edid } @l; push @l, [ "vbe$port" => $edid ]; + last if $b_get_first; } } } |