wfreerdp: fix bitmap decompression
This commit is contained in:
parent
194045b62a
commit
d0b9478f45
@ -97,11 +97,9 @@ void wf_Bitmap_New(rdpContext* context, rdpBitmap* bitmap)
|
||||
wfBitmap* wf_bitmap = (wfBitmap*) bitmap;
|
||||
wfInfo* wfi = ((wfContext*) context)->wfi;
|
||||
|
||||
if (bitmap->ephemeral)
|
||||
return;
|
||||
wf_bitmap = (wfBitmap*) bitmap;
|
||||
|
||||
hdc = GetDC(NULL);
|
||||
wf_bitmap = (wfBitmap*) bitmap;
|
||||
wf_bitmap->hdc = CreateCompatibleDC(hdc);
|
||||
|
||||
if (bitmap->data == NULL)
|
||||
@ -152,7 +150,7 @@ void wf_Bitmap_Decompress(rdpContext* context, rdpBitmap* bitmap,
|
||||
else
|
||||
bitmap->data = (uint8*) xrealloc(bitmap->data, size);
|
||||
|
||||
if (bitmap->compressed)
|
||||
if (compressed)
|
||||
{
|
||||
boolean status;
|
||||
|
||||
|
@ -224,8 +224,6 @@ boolean wf_post_connect(freerdp* instance)
|
||||
width = settings->width;
|
||||
height = settings->height;
|
||||
|
||||
wf_register_graphics(instance->context->graphics);
|
||||
|
||||
if (wfi->sw_gdi)
|
||||
{
|
||||
gdi_init(instance, CLRCONV_ALPHA | CLRBUF_32BPP, NULL);
|
||||
@ -316,6 +314,8 @@ boolean wf_post_connect(freerdp* instance)
|
||||
offscreen_cache_register_callbacks(instance->update);
|
||||
}
|
||||
|
||||
wf_register_graphics(instance->context->graphics);
|
||||
|
||||
freerdp_channels_post_connect(instance->context->channels, instance);
|
||||
|
||||
return True;
|
||||
|
@ -98,6 +98,7 @@ void update_gdi_bitmap_update(rdpUpdate* update, BITMAP_UPDATE* bitmap_update)
|
||||
|
||||
bitmap->bpp = bitmap_data->bitsPerPixel;
|
||||
bitmap->length = bitmap_data->bitmapLength;
|
||||
bitmap->compressed = bitmap_data->compressed;
|
||||
|
||||
Bitmap_SetRectangle(update->context, bitmap,
|
||||
bitmap_data->destLeft, bitmap_data->destTop,
|
||||
|
@ -128,6 +128,7 @@ boolean rdp_recv_server_redirection_pdu(rdpRdp* rdp, STREAM* s)
|
||||
|
||||
if (redirection->flags & LB_TARGET_NET_ADDRESSES)
|
||||
{
|
||||
int i;
|
||||
uint32 count;
|
||||
uint32 targetNetAddressesLength;
|
||||
|
||||
@ -138,9 +139,6 @@ boolean rdp_recv_server_redirection_pdu(rdpRdp* rdp, STREAM* s)
|
||||
|
||||
redirection->targetNetAddresses = (rdpString*) xzalloc(count * sizeof(rdpString));
|
||||
|
||||
|
||||
int i;
|
||||
|
||||
for (i=0; i < count; i++)
|
||||
{
|
||||
freerdp_string_read_length32(s, &redirection->targetNetAddresses[i], rdp->settings->uniconv);
|
||||
|
Loading…
Reference in New Issue
Block a user