diff options
Diffstat (limited to 'lib/gui/bmp.c')
-rw-r--r-- | lib/gui/bmp.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/gui/bmp.c b/lib/gui/bmp.c index 892b759ee1..143aa28055 100644 --- a/lib/gui/bmp.c +++ b/lib/gui/bmp.c @@ -79,17 +79,17 @@ static int bmp_renderer(struct screen *sc, struct surface *s, struct image *img) image = (char *)bmp + get_unaligned_le32(&bmp->header.data_offset); image += (img->height - y - 1) * img->width * (bits_per_pixel >> 3); - adr = buf + (y + starty) * sc->info.line_length + - startx * (sc->info.bits_per_pixel >> 3); + adr = buf + (y + starty) * sc->info->line_length + + startx * (sc->info->bits_per_pixel >> 3); for (x = 0; x < width; x++) { int pixel; pixel = *image; - gu_set_rgb_pixel(&sc->info, adr, color_table[pixel].red, + gu_set_rgb_pixel(sc->info, adr, color_table[pixel].red, color_table[pixel].green, color_table[pixel].blue); - adr += sc->info.bits_per_pixel >> 3; + adr += sc->info->bits_per_pixel >> 3; image += bits_per_pixel >> 3; } @@ -101,16 +101,16 @@ static int bmp_renderer(struct screen *sc, struct surface *s, struct image *img) image = (char *)bmp + get_unaligned_le32(&bmp->header.data_offset); image += (img->height - y - 1) * img->width * (bits_per_pixel >> 3); - adr = buf + (y + starty) * sc->info.line_length + - startx * (sc->info.bits_per_pixel >> 3); + adr = buf + (y + starty) * sc->info->line_length + + startx * (sc->info->bits_per_pixel >> 3); for (x = 0; x < width; x++) { char *pixel; pixel = image; - gu_set_rgb_pixel(&sc->info, adr, pixel[2], pixel[1], + gu_set_rgb_pixel(sc->info, adr, pixel[2], pixel[1], pixel[0]); - adr += sc->info.bits_per_pixel >> 3; + adr += sc->info->bits_per_pixel >> 3; image += bits_per_pixel >> 3; } |