aboutsummaryrefslogtreecommitdiff
path: root/libgui/bmp.c
diff options
context:
space:
mode:
authorMarvin Borner2021-02-17 22:13:59 +0100
committerMarvin Borner2021-02-18 18:03:43 +0100
commite28ea65105c4afd3a3dea7d050b392565d15120d (patch)
treef3c1eaf8c4da5d71893355db1779d73d98f68d2f /libgui/bmp.c
parentb32cb0a22db893c106cb86ca0f1178d5da05b551 (diff)
Started GUI rewrite
It's a mess right now..
Diffstat (limited to 'libgui/bmp.c')
-rw-r--r--libgui/bmp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libgui/bmp.c b/libgui/bmp.c
index 9fffbf5..c8795e8 100644
--- a/libgui/bmp.c
+++ b/libgui/bmp.c
@@ -19,11 +19,11 @@ struct bmp *bmp_load(const char *path)
// TODO: Support padding with odd widths
struct bmp_info *info = (struct bmp_info *)((u32)buf + sizeof(*h));
struct bmp *bmp = malloc(sizeof(*bmp));
- bmp->width = info->width;
- bmp->height = info->height;
+ bmp->size.x = info->width;
+ bmp->size.y = info->height;
bmp->data = (u8 *)((u32)buf + h->offset);
bmp->bpp = info->bpp;
- bmp->pitch = bmp->width * (bmp->bpp >> 3);
+ bmp->pitch = bmp->size.x * (bmp->bpp >> 3);
return bmp;
}