1
0
Fork 0

Small change to fill() to exit early if there is nothing to do.

This avoids running unnessary code and avoids a bug in set_window().

Signed-off-by: Tony Robinson <tony@tonyRobinson.com>
This commit is contained in:
Tony Robinson 2023-09-24 16:17:31 +01:00 committed by Daniel Thompson
parent b32787e5ea
commit ae4230a6d7

View file

@ -150,9 +150,11 @@ class Draw565(object):
if h is None: if h is None:
h = display.height - y h = display.height - y
display.set_window(x, y, w, h)
remaining = w * h remaining = w * h
if remaining == 0:
return
display.set_window(x, y, w, h)
# Populate the line buffer # Populate the line buffer
buf = display.linebuffer buf = display.linebuffer