mirror of
https://git.planet-casio.com/Lephenixnoir/gint.git
synced 2024-12-29 13:03:36 +01:00
bopti: fix p4 stride omission from 1384c54b5
This commit is contained in:
parent
d8b85a9fab
commit
36d66a6317
1 changed files with 4 additions and 2 deletions
|
@ -59,11 +59,13 @@ void bopti_render(bopti_image_t const *img, struct box *box)
|
|||
uint16_t const *palette = data;
|
||||
data += 32;
|
||||
|
||||
int true_width = img->width + (img->width & 1);
|
||||
|
||||
/* Due to nibble alignment being a hassle, in this function the
|
||||
input stride is expressed in pixels. */
|
||||
int in = img->width - w + (img->width & 1);
|
||||
int in = true_width - w;
|
||||
/* Also we don't move pointers, we just use pixel offsets. */
|
||||
int offset = img->width * box->top + box->left;
|
||||
int offset = true_width * box->top + box->left;
|
||||
|
||||
bopti_p4(data, target, w, h, in, out, palette, img->alpha,
|
||||
offset);
|
||||
|
|
Loading…
Reference in a new issue