From b5938163a7368bf82ca865fdd3fdc4ad1f43bc51 Mon Sep 17 00:00:00 2001 From: twilen Date: Sun, 8 Apr 2012 19:08:57 +0000 Subject: [PATCH] Force at least 16 pixel alignment, standard bitmaps are also at least 16 pixel aligned. Fixes bad mask on some planar Scalos icons. git-svn-id: https://svn.aros.org/svn/aros/trunk/AROS@44577 fb15a70f-31f2-0310-bbcc-cdcc74a49acc --- arch/m68k-amiga/hidd/uaegfx/uaegfxbitmap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/m68k-amiga/hidd/uaegfx/uaegfxbitmap.c b/arch/m68k-amiga/hidd/uaegfx/uaegfxbitmap.c index 0658c4cf60..fd0953511e 100644 --- a/arch/m68k-amiga/hidd/uaegfx/uaegfxbitmap.c +++ b/arch/m68k-amiga/hidd/uaegfx/uaegfxbitmap.c @@ -207,7 +207,7 @@ OOP_Object *UAEGFXBitmap__Root__New(OOP_Class *cl, OOP_Object *o, struct pRoot_N OOP_GetAttr(o, aHidd_BitMap_PixFmt, (APTR)&data->pixfmtobj); OOP_GetAttr(data->pixfmtobj, aHidd_PixFmt_BytesPerPixel, &multi); - bitsperpixel = multi * 8; + bitsperpixel = multi > 2 ? 32 : 16; data->rgbformat = getrtgformat(csd, data->pixfmtobj); data->width = width; width = (width + bitsperpixel - 1) & ~(bitsperpixel - 1); @@ -390,7 +390,7 @@ VOID UAEGFXBitmap__Root__Get(OOP_Class *cl, OOP_Object *o, struct pRoot_Get *msg *msg->storage = data->disp; return; case aoHidd_BitMap_Align: - *msg->storage = data->bytesperpixel == 0 ? 8 : data->bytesperpixel * 8; + *msg->storage = data->bytesperpixel < 4 ? 16 : 32; return; case aoHidd_BitMap_IsLinearMem: *msg->storage = TRUE; -- 2.11.4.GIT