Skip to content

Commit 7490adf

Browse files
committed
Use width for x. Thanks @deshipu
1 parent da3d75f commit 7490adf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

shared-module/displayio/TileGrid.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ void common_hal_displayio_tilegrid_set_tile(displayio_tilegrid_t *self, uint16_t
221221
}
222222
int16_t tx = (x - self->top_left_x) % self->width_in_tiles;
223223
if (tx < 0) {
224-
tx += self->height_in_tiles;
224+
tx += self->width_in_tiles;
225225
}
226226
tile_area->x1 = tx * self->tile_width;
227227
tile_area->x2 = tile_area->x1 + self->tile_width;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy