79 |
} |
} |
80 |
|
|
81 |
in_uint16_le(rdp_s, length); |
in_uint16_le(rdp_s, length); |
82 |
|
/* 32k packets are really 8, keepalive fix */ |
83 |
|
if (length == 0x8000) |
84 |
|
{ |
85 |
|
next_packet += 8; |
86 |
|
*type = 0; |
87 |
|
return rdp_s; |
88 |
|
} |
89 |
in_uint16_le(rdp_s, pdu_type); |
in_uint16_le(rdp_s, pdu_type); |
90 |
in_uint8s(rdp_s, 2); /* userid */ |
in_uint8s(rdp_s, 2); /* userid */ |
91 |
*type = pdu_type & 0xf; |
*type = pdu_type & 0xf; |
579 |
if (!compress) |
if (!compress) |
580 |
{ |
{ |
581 |
int y; |
int y; |
582 |
bmpdata = xmalloc(width * height); |
bmpdata = xmalloc(width * height * (bpp / 8)); |
583 |
for (y = 0; y < height; y++) |
for (y = 0; y < height; y++) |
584 |
{ |
{ |
585 |
in_uint8a(s, &bmpdata[(height - y - 1) * width], width); |
in_uint8a(s, &bmpdata[(height - y - 1) * (width * (bpp / 8))], width * (bpp / 8)); |
586 |
} |
} |
587 |
ui_paint_bitmap(left, top, cx, cy, width, height, bmpdata); |
ui_paint_bitmap(left, top, cx, cy, width, height, bmpdata); |
588 |
xfree(bmpdata); |
xfree(bmpdata); |
593 |
in_uint16_le(s, size); |
in_uint16_le(s, size); |
594 |
in_uint8s(s, 4); /* line_size, final_size */ |
in_uint8s(s, 4); /* line_size, final_size */ |
595 |
in_uint8p(s, data, size); |
in_uint8p(s, data, size); |
596 |
|
bmpdata = xmalloc(width * height * (bpp / 8)); |
597 |
bmpdata = xmalloc(width * height); |
if (bitmap_decompress(bmpdata, width, height, data, size, bpp)) |
|
if (bitmap_decompress(bmpdata, width, height, data, size)) |
|
598 |
{ |
{ |
599 |
ui_paint_bitmap(left, top, cx, cy, width, height, bmpdata); |
ui_paint_bitmap(left, top, cx, cy, width, height, bmpdata); |
600 |
} |
} |
|
|
|
601 |
xfree(bmpdata); |
xfree(bmpdata); |
602 |
} |
} |
603 |
} |
} |
623 |
in_uint8(s, entry->red); |
in_uint8(s, entry->red); |
624 |
in_uint8(s, entry->green); |
in_uint8(s, entry->green); |
625 |
in_uint8(s, entry->blue); |
in_uint8(s, entry->blue); |
626 |
} |
} |
627 |
|
|
628 |
hmap = ui_create_colourmap(&map); |
hmap = ui_create_colourmap(&map); |
629 |
ui_set_colourmap(hmap); |
ui_set_colourmap(hmap); |
717 |
process_data_pdu(s); |
process_data_pdu(s); |
718 |
break; |
break; |
719 |
|
|
720 |
|
case 0: |
721 |
|
break; |
722 |
|
|
723 |
default: |
default: |
724 |
unimpl("PDU %d\n", type); |
unimpl("PDU %d\n", type); |
725 |
} |
} |