Don't fail hard in get_fb_dimensions if a mode isn't WWWxHHH

See #159
Phillip Berndt 2019-08-16 16:07:51 +02:00 committed by Gürkan Gür
parent 06c364ae9f
commit 65f6b1c9bc
1 changed files with 4 additions and 1 deletions

View File

@ -662,7 +662,10 @@ def get_fb_dimensions(configuration):
if "off" in output.options or not output.edid:
# This won't work with all modes -- but it's a best effort.
o_mode ="[0-9]{3,}x[0-9]{3,}", output.options["mode"]).group(0)
match ="[0-9]{3,}x[0-9]{3,}", output.options["mode"])
if not match:
return None
o_mode =
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(","))