diff options
| author | jsorg71 <jsorg71> | 2006-02-06 01:34:41 +0000 |
|---|---|---|
| committer | jsorg71 <jsorg71> | 2006-02-06 01:34:41 +0000 |
| commit | ebb1afd2e878d198aca27840876e3a7dd262a8f6 (patch) | |
| tree | e465f2ce2e58a610b13f9c6ab686e2deb94a37b4 /rdp/rdp_rdp.c | |
| parent | 64bdbed95fcacb3c491109b8d5317cd2585f072a (diff) | |
| download | xrdp-proprietary-ebb1afd2e878d198aca27840876e3a7dd262a8f6.tar.gz xrdp-proprietary-ebb1afd2e878d198aca27840876e3a7dd262a8f6.zip | |
uncompress bitmaps and big endian fixes
Diffstat (limited to 'rdp/rdp_rdp.c')
| -rw-r--r-- | rdp/rdp_rdp.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/rdp/rdp_rdp.c b/rdp/rdp_rdp.c index 2b1c6791..00b8fa57 100644 --- a/rdp/rdp_rdp.c +++ b/rdp/rdp_rdp.c @@ -505,6 +505,7 @@ rdp_rdp_process_bitmap_updates(struct rdp_rdp* self, struct stream* s) int bufsize; int size; int i; + int x; int y; char* data; char* bmpdata0; @@ -546,12 +547,25 @@ rdp_rdp_process_bitmap_updates(struct rdp_rdp* self, struct stream* s) self->mod->server_paint_rect(self->mod, left, top, cx, cy, bmpdata1, width, height, 0, 0); } - else + else /* not compressed */ { for (y = 0; y < height; y++) { data = bmpdata0 + ((height - y) - 1) * (width * Bpp); - in_uint8a(s, data, width * Bpp); + if (Bpp == 1) + { + for (x = 0; x < width; x++) + { + in_uint8(s, data[x]); + } + } + else if (Bpp == 2) + { + for (x = 0; x < width; x++) + { + in_uint16_le(s, ((unsigned short*)data)[x]); + } + } } bmpdata1 = rdp_orders_convert_bitmap(bpp, self->mod->xrdp_bpp, bmpdata0, width, height, |
