diff options
author | Jonathan Cave <jonathan.cave@canonical.com> | 2021-10-13 17:59:01 +0100 |
---|---|---|
committer | Jonathan Cave <jonathan.cave@canonical.com> | 2021-10-13 17:59:01 +0100 |
commit | 2b6a2ace698183045eeaf5196952dfeb819f2ef5 (patch) | |
tree | afc0c4db76fe856a266b5c9c75752a463f4f2a68 /bin | |
parent | 58ea2751b3ab0fac24ffd89fd34cb50707c272e7 (diff) |
Change: interlaced modes don't generate error
In the graphics/{}_cycle_resolution_{} test do not produce error output when encountering interlaced modes which do not prevent cycling through modes of the same resolution. lp: #1946469
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/xrandr_cycle.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/bin/xrandr_cycle.py b/bin/xrandr_cycle.py index 104ffbd..6c9afc5 100755 --- a/bin/xrandr_cycle.py +++ b/bin/xrandr_cycle.py @@ -80,10 +80,13 @@ for line in output: current_modes.append((device_context, foo[0])) # let's create a dict of aspect_ratio:largest_width for each display # (width, because it's easier to compare simple ints when looking for the -# highest value). +# highest value). Ignore Interlaced modes that are indicated by presence of a +# trailing 'i' character. top_res_per_aspect = OrderedDict() for adapter, mode in modes: try: + if mode[-1] == 'i': + continue width, height = [int(x) for x in mode.split('x')] aspect = Fraction(width, height) if adapter not in top_res_per_aspect: |