Merge pull request #17 from ArvidNorr/upsidedown
turn uncompressed bitmapV2 upside down
This commit is contained in:
commit
650aca7d9c
@ -710,6 +710,32 @@ lfreerdp_cache_bitmap(rdpContext* context, CACHE_BITMAP_ORDER* cache_bitmap_orde
|
|||||||
LLOGLN(10, ("lfreerdp_cache_bitmap:"));
|
LLOGLN(10, ("lfreerdp_cache_bitmap:"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/******************************************************************************/
|
||||||
|
/* Turn the bitmap upside down*/
|
||||||
|
static void DEFAULT_CC
|
||||||
|
lfreerdp_upsidedown(uint8* destination, CACHE_BITMAP_V2_ORDER* cache_bitmap_v2_order, int server_Bpp)
|
||||||
|
{
|
||||||
|
tui8* src;
|
||||||
|
tui8* dst;
|
||||||
|
int line_bytes;
|
||||||
|
int j ;
|
||||||
|
if(destination==NULL)
|
||||||
|
{
|
||||||
|
LLOGLN(0, ("lfreerdp_upsidedown : destination pointer is NULL !!!"));
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
|
||||||
|
line_bytes = server_Bpp * cache_bitmap_v2_order->bitmapWidth;
|
||||||
|
src = cache_bitmap_v2_order->bitmapDataStream;
|
||||||
|
dst = destination + ((cache_bitmap_v2_order->bitmapHeight) * line_bytes);
|
||||||
|
for (j = 0; j < cache_bitmap_v2_order->bitmapHeight; j++)
|
||||||
|
{
|
||||||
|
dst -= line_bytes;
|
||||||
|
g_memcpy(dst, src, line_bytes);
|
||||||
|
src += line_bytes;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
static void DEFAULT_CC
|
static void DEFAULT_CC
|
||||||
lfreerdp_cache_bitmapV2(rdpContext* context,
|
lfreerdp_cache_bitmapV2(rdpContext* context,
|
||||||
@ -770,8 +796,10 @@ lfreerdp_cache_bitmapV2(rdpContext* context,
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
g_memcpy(dst_data, cache_bitmap_v2_order->bitmapDataStream,
|
/* Uncompressed bitmaps are upside down */
|
||||||
width * height * server_Bpp);
|
lfreerdp_upsidedown(dst_data, cache_bitmap_v2_order,server_Bpp);
|
||||||
|
LLOGLN(10, ("lfreerdp_cache_bitmapV2: upside down progressed"));
|
||||||
|
/* old: g_memcpy(dst_data, cache_bitmap_v2_order->bitmapDataStream,width * height * server_Bpp);*/
|
||||||
}
|
}
|
||||||
dst_data1 = convert_bitmap(server_bpp, client_bpp, dst_data,
|
dst_data1 = convert_bitmap(server_bpp, client_bpp, dst_data,
|
||||||
width, height, mod->colormap);
|
width, height, mod->colormap);
|
||||||
|
Loading…
Reference in New Issue
Block a user