aboutsummaryrefslogtreecommitdiff
path: root/src/imv.c
diff options
context:
space:
mode:
authorHarry Jeffery <harry@exec64.co.uk>2017-11-26 13:43:05 +0000
committerHarry Jeffery <harry@exec64.co.uk>2017-11-26 13:43:18 +0000
commit7d310e4897887909099afa1cb9333dd85eae3bd4 (patch)
treecc8b7ac3e5b8d64baaa90a9cbdfcd8b7f1afe64a /src/imv.c
parent2c51ecf4eef9e06a464ed73f17bd3752d47d3dee (diff)
downloadimv-7d310e4897887909099afa1cb9333dd85eae3bd4.tar.gz
Use imv_bitmap for bitmaps intead of FIBITMAP
Diffstat (limited to 'src/imv.c')
-rw-r--r--src/imv.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/imv.c b/src/imv.c
index ef03fb8..642a060 100644
--- a/src/imv.c
+++ b/src/imv.c
@@ -644,11 +644,11 @@ static void handle_event(struct imv *imv, SDL_Event *event)
if(event->type == imv->events.NEW_IMAGE) {
/* new image to display */
- FIBITMAP *bmp = event->user.data1;
+ struct imv_bitmap *bmp = event->user.data1;
imv_image_set_bitmap(imv->image, bmp);
- imv->current_image.width = FreeImage_GetWidth(bmp);
- imv->current_image.height = FreeImage_GetHeight(bmp);
- FreeImage_Unload(bmp);
+ imv->current_image.width = bmp->width;
+ imv->current_image.height = bmp->height;
+ imv_bitmap_free(bmp);
imv->need_redraw = true;
imv->need_rescale |= event->user.code;
return;