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:
parent
b32787e5ea
commit
ae4230a6d7
1 changed files with 4 additions and 2 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue