Optimize display height assignment

This commit is contained in:
Cooper Dalrymple 2025-08-12 13:59:59 -05:00
parent f5b3367c2b
commit bfc6140e6d

View file

@ -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: