diff --git a/src/fbprimitive.c b/src/fbprimitive.c index 325ef2f..2ba096f 100644 --- a/src/fbprimitive.c +++ b/src/fbprimitive.c @@ -1,6 +1,7 @@ #include #include #include "wintype.h" +#inlcude "log.h" #include "fbinit.h" #include "fontengine.h" #include "fbprimitive.h" @@ -122,21 +123,24 @@ static void internal_textout(INT32 x, INT32 y, INT32 width, INT32 height, PBYTE INT32 i, j; BYTE b; PUINT16 dptr, lbuf; - + + Log(LDEBUG, "internal_textout(%d, %d, %d, %d, bits)", x, y, width, height); if (((x + width) >= Fb_Info->width) || ((y + height) >= Fb_Info->height)) return; dptr = loc_from_coords(x, y); lbuf = (PUINT16)alloca(width * sizeof(UINT16)); for (i=0; i> 3) & 0x1F) << 11; - lbuf[i] |= ((UINT16)(b >> 2) & 0x3F) << 5; - lbuf[i] |= ((UINT16)(b >> 3) & 0x1F); + lbuf[j] = ((UINT16)(b >> 3) & 0x1F) << 11; + lbuf[j] |= ((UINT16)(b >> 2) & 0x3F) << 5; + lbuf[j] |= ((UINT16)(b >> 3) & 0x1F); } + Log(LDEBUG, "rendering row %d", i); memcpy(dptr, lbuf, width * sizeof(UINT16)); dptr += Fb_Info->width; }