summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xatari/bitmap.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/atari/bitmap.c b/atari/bitmap.c
index 774f0e9c8..0f27be49e 100755
--- a/atari/bitmap.c
+++ b/atari/bitmap.c
@@ -117,7 +117,6 @@ void * bitmap_create_ex( int w, int h, short bpp, int rowstride, unsigned int st
bitmap->bpp = bpp;
bitmap->resized = NULL;
bitmap->rowstride = rowstride;
- bitmap->opaque = true;
} else {
free(bitmap);
bitmap=NULL;
@@ -422,6 +421,7 @@ size_t bitmap_get_bpp(void *bitmap)
bool bitmap_resize(struct bitmap *img, HermesHandle hermes_h,
HermesFormat *fmt, int nw, int nh)
{
+ unsigned int state = 0;
short bpp = bitmap_get_bpp( img );
int stride = bitmap_get_rowstride( img );
int err;
@@ -437,7 +437,10 @@ bool bitmap_resize(struct bitmap *img, HermesHandle hermes_h,
}
/* allocate the mem for resized bitmap */
- img->resized = bitmap_create_ex( nw, nh, bpp, nw*bpp, 0, NULL );
+ if (img->opaque == true) {
+ state |= BITMAP_OPAQUE;
+ }
+ img->resized = bitmap_create_ex( nw, nh, bpp, nw*bpp, state, NULL );
if( img->resized == NULL ) {
printf("W: %d, H: %d, bpp: %d\n", nw, nh, bpp);
assert(img->resized);