summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoy Hooper <rhooper@toybox.ca>2019-12-16 15:05:09 -0500
committerRoy Hooper <rhooper@toybox.ca>2019-12-16 15:05:09 -0500
commitef2a8906ddd1b21c37d31fe7098fe6b7d5b5940d (patch)
tree8d3177a9ee12d72c1bf74640e91491b300e820c6
parentcc31f2d10fd6cf0b96110c7b390e514dc0c3dbc1 (diff)
move call to show outside loop
-rw-r--r--shared-bindings/_pixelbuf/PixelBuf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/shared-bindings/_pixelbuf/PixelBuf.c b/shared-bindings/_pixelbuf/PixelBuf.c
index feda2c573..1ed6f7baf 100644
--- a/shared-bindings/_pixelbuf/PixelBuf.c
+++ b/shared-bindings/_pixelbuf/PixelBuf.c
@@ -352,9 +352,9 @@ STATIC mp_obj_t pixelbuf_pixelbuf_fill(mp_obj_t self_in, mp_obj_t value) {
for (size_t offset = 0; offset < self->bytes; offset+= self->pixel_step) {
pixelbuf_set_pixel(self->buf + offset, self->two_buffers ? (self->rawbuf + offset) : NULL,
self->brightness, value, &self->byteorder, self->byteorder.is_dotstar);
- if (self->auto_write)
- call_show(self_in);
}
+ if (self->auto_write)
+ call_show(self_in);
return mp_const_none;
}
STATIC MP_DEFINE_CONST_FUN_OBJ_2(pixelbuf_pixelbuf_fill_obj, pixelbuf_pixelbuf_fill);