diff options
| author | Scott Shawcroft <scott@tannewt.org> | 2019-06-17 16:09:02 -0700 |
|---|---|---|
| committer | Scott Shawcroft <scott@tannewt.org> | 2019-06-17 16:23:38 -0700 |
| commit | 7490adf8e945b7c040ea5a22293675b8b29da8da (patch) | |
| tree | 927d013846b87bd6d1301f756505841a77786664 /shared-module | |
| parent | da3d75f7b108279a05b99d18eca677f23fccac44 (diff) | |
Use width for x. Thanks @deshipu
Diffstat (limited to 'shared-module')
| -rw-r--r-- | shared-module/displayio/TileGrid.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/shared-module/displayio/TileGrid.c b/shared-module/displayio/TileGrid.c index c671f13d1..cdca45a29 100644 --- a/shared-module/displayio/TileGrid.c +++ b/shared-module/displayio/TileGrid.c @@ -221,7 +221,7 @@ void common_hal_displayio_tilegrid_set_tile(displayio_tilegrid_t *self, uint16_t } int16_t tx = (x - self->top_left_x) % self->width_in_tiles; if (tx < 0) { - tx += self->height_in_tiles; + tx += self->width_in_tiles; } tile_area->x1 = tx * self->tile_width; tile_area->x2 = tile_area->x1 + self->tile_width; |
