fbaccel: fix blit2FB on SPARK/TD/x86

This commit is contained in:
Stefan Seyfried
2013-01-14 22:49:49 +01:00
parent 379ef4c9d1
commit c1dd39b42e
2 changed files with 5 additions and 4 deletions

View File

@@ -572,7 +572,7 @@ void CFbAccel::blit2FB(void *fbbuff, uint32_t width, uint32_t height, uint32_t x
size_t mem_sz = width * height * sizeof(fb_pixel_t);
unsigned long ulFlags = 0;
if (transp) /* transp == false (default) means: color "0x0" is transparent (??) */
if (!transp) /* transp == false (default): use transparency from source alphachannel */
ulFlags = BLT_OP_FLAGS_BLEND_SRC_ALPHA|BLT_OP_FLAGS_BLEND_DST_MEMORY; // we need alpha blending
STMFBIO_BLT_EXTERN_DATA blt_data;
@@ -619,7 +619,7 @@ void CFbAccel::blit2FB(void *fbbuff, uint32_t width, uint32_t height, uint32_t x
d2 = (fb_pixel_t *) d;
for (int count2 = 0; count2 < xc; count2++ ) {
fb_pixel_t pix = *(pixpos + xp);
if (!transp || (pix & 0xff000000) == 0xff000000)
if (transp || (pix & 0xff000000) == 0xff000000)
*d2 = pix;
else {
uint8_t *in = (uint8_t *)(pixpos + xp);
@@ -675,7 +675,8 @@ void CFbAccel::blit2FB(void *fbbuff, uint32_t width, uint32_t height, uint32_t x
dfbdest->SetBlittingFlags(dfbdest, DSBLIT_SRC_COLORKEY);
}
else
dfbdest->SetBlittingFlags(dfbdest, DSBLIT_NOFX);
dfbdest->SetBlittingFlags(dfbdest, DSBLIT_BLEND_ALPHACHANNEL);
dfbdest->Blit(dfbdest, surf, &src, xoff, yoff);
surf->Release(surf);
return;

View File

@@ -977,7 +977,7 @@ _display:
if (paintBg)
paintBoxRel(x, yy, width, height, colBg);
blit2FB(data, width, height, x, yy, 0, 0, true);
blit2FB(data, width, height, x, yy);
return true;
}