]> git.donarmstrong.com Git - deb_pkgs/autorandr.git/commitdiff
Partially support modes with non-standard names
authorWaester <Waester@users.noreply.github.com>
Thu, 11 Oct 2018 13:55:48 +0000 (15:55 +0200)
committerWaester <Waester@users.noreply.github.com>
Fri, 12 Oct 2018 07:28:47 +0000 (09:28 +0200)
autorandr.py

index d36b568485aca6e87a3b61e83ada3be63fe866b6..1b65694e891086ce693d7dc8423529a71fb3f3a4 100755 (executable)
@@ -638,7 +638,8 @@ def get_fb_dimensions(configuration):
         if "off" in output.options or not output.edid:
             continue
         # This won't work with all modes -- but it's a best effort.
-        o_width, o_height = map(int, output.options["mode"].split("x"))
+        o_mode = re.search("^[0-9]+x[0-9]+", output.options["mode"]).group(0)
+        o_width, o_height = map(int, o_mode.split("x"))
         if "transform" in output.options:
             a, b, c, d, e, f, g, h, i = map(float, output.options["transform"].split(","))
             w = (g * o_width + h * o_height + i)