Hi,
I have just pushed further refactoring / improvements of the libgdi code to
properly handle color conversion in the failure cases encountered. I closed
the issue on github. I didn't fix it the same way you did, but it works.
Sorry about that, my time was taken by my final exams, now I have more time
to spend on it.
Please report any other issues you might encounter following the latest
updates.
On Mon, May 2, 2011 at 9:37 AM, Howard Su <howard...@gmail.com> wrote:
> i found the problem. the bug is that the code assume char is unsigned by
> default which is not the case in my cross-build-gcc. I changed char* to
> sint8*. the problem goes away.
>
> the fix diff is following. Please commit.
> diff --git a/libgdi/gdi_16bpp.c b/libgdi/gdi_16bpp.c
> index 56038d2..efb50fe 100644
> --- a/libgdi/gdi_16bpp.c
> +++ b/libgdi/gdi_16bpp.c
> @@ -394,8 +394,8 @@ static int BitBlt_DSPDxax_16bpp(HDC hdcDest, int
> nXDest, int nYDest, int nWidth,
> {
> for (x = 0; x < nWidth; x++)
> {
> - /* we need the char* cast here so that 0xFF
> becomes 0xFFFF and not 0x00FF */
> - *dstp = (*((char*)srcp) & pixelColor) |
> (~(*((char*)srcp)) & *dstp);
> + /* we need the sint8* cast here so that
> 0xFF becomes 0xFFFF and not 0x00FF */
> + *dstp = (*((sint8*)srcp) & pixelColor) |
> (~(*((sint8*)srcp)) & *dstp);
> dstp++;
> srcp++;
> }
> diff --git a/libgdi/gdi_32bpp.c b/libgdi/gdi_32bpp.c
> index bc220e4..cd6a843 100644
> --- a/libgdi/gdi_32bpp.c
> +++ b/libgdi/gdi_32bpp.c
> @@ -451,8 +451,8 @@ static int BitBlt_DSPDxax_32bpp(HDC hdcDest, int
> nXDest, int nYDest, int nWidth,
> {
> for (x = 0; x < nWidth; x++)
> {
> - /* we need the char* cast here so that 0xFF
> becomes 0xFFFFFFFF and not 0x000000FF */
> - *dstp = (*((char*)srcp) &
> hdcDest->textColor) | (~(*((char*)srcp)) & *dstp);
> + /* we need the sing8* cast here so that
> 0xFF becomes 0xFFFFFFFF and not 0x000000FF */
> + *dstp = (*((sint8*)srcp) &
> hdcDest->textColor) | (~(*((sint8*)srcp)) & *dstp);
> dstp++;
> srcp++;
> }
>
>
> On Tue, Apr 26, 2011 at 4:16 PM, Howard Su <howard...@gmail.com> wrote:
>
>> I am working on a port on a thinclient which is based on ARM+DirectFB.
>>
>> I am using 16bpp. One odd problem I noticed is the color for font is
>> strange. white color 0xffffff00 will be rendered as yellow 0x00ffff00. I
>> would like to know if anyone has the idea what's the issue. But other color
>> in the rest of window is correct. I checked xrdp code, seems font render is
>> used some rdp order to do it instead of sending a picture over the wire.
>> anyone can help me to do further investigation?
>>
>> P.S. I am doing a cross build from i386 to ARM. freerdp works nicely.
>> After I fix one bug in mouse position handle, i basically get
>> my scenario works except the font color.
>>
>> --
>> -Howard
>>
>
>
>
> --
> -Howard
>
>
> ------------------------------------------------------------------------------
> WhatsUp Gold - Download Free Network Management Software
> The most intuitive, comprehensive, and cost-effective network
> management toolset available today. Delivers lowest initial
> acquisition cost and overall TCO of any competing solution.
> http://p.sf.net/sfu/whatsupgold-sd
> _______________________________________________
> Freerdp-devel mailing list
> Freerdp-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/freerdp-devel
>
>
------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network
management toolset available today. Delivers lowest initial
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
_______________________________________________
Freerdp-devel mailing list
Freerdp-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freerdp-devel