Optimize display height assignment
This commit is contained in:
parent
f5b3367c2b
commit
bfc6140e6d
1 changed files with 1 additions and 3 deletions
|
|
@ -85,9 +85,7 @@ def request_display_config(width=None, height=None, color_depth=None):
|
|||
|
||||
# if user does not specify height, use matching height
|
||||
if height is None:
|
||||
for size in VALID_DISPLAY_SIZES:
|
||||
if width == size[0]:
|
||||
height = size[1]
|
||||
height = next((h for w, h in VALID_DISPLAY_SIZES if width == w))
|
||||
|
||||
# if user does not specify a requested color_depth
|
||||
if color_depth is None:
|
||||
|
|
|
|||
Loading…
Reference in a new issue