/[rdesktop]/sourceforge.net/trunk/rdesktop/rdp.c
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /sourceforge.net/trunk/rdesktop/rdp.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 309 by jsorg71, Tue Feb 4 05:32:13 2003 UTC revision 314 by jsorg71, Fri Feb 7 23:43:37 2003 UTC
# Line 552  process_bitmap_updates(STREAM s) Line 552  process_bitmap_updates(STREAM s)
552  {  {
553          uint16 num_updates;          uint16 num_updates;
554          uint16 left, top, right, bottom, width, height;          uint16 left, top, right, bottom, width, height;
555          uint16 cx, cy, bpp, compress, bufsize, size;          uint16 cx, cy, bpp, Bpp, compress, bufsize, size;
556          uint8 *data, *bmpdata;          uint8 *data, *bmpdata;
557          int i;          int i;
558    
# Line 567  process_bitmap_updates(STREAM s) Line 567  process_bitmap_updates(STREAM s)
567                  in_uint16_le(s, width);                  in_uint16_le(s, width);
568                  in_uint16_le(s, height);                  in_uint16_le(s, height);
569                  in_uint16_le(s, bpp);                  in_uint16_le(s, bpp);
570                    Bpp = (bpp + 7) / 8;
571                  in_uint16_le(s, compress);                  in_uint16_le(s, compress);
572                  in_uint16_le(s, bufsize);                  in_uint16_le(s, bufsize);
573    
# Line 579  process_bitmap_updates(STREAM s) Line 580  process_bitmap_updates(STREAM s)
580                  if (!compress)                  if (!compress)
581                  {                  {
582                          int y;                          int y;
583                          bmpdata = xmalloc(width * height * (bpp / 8));                          bmpdata = xmalloc(width * height * Bpp);
584                          for (y = 0; y < height; y++)                          for (y = 0; y < height; y++)
585                          {                          {
586                                  in_uint8a(s, &bmpdata[(height - y - 1) * (width * (bpp / 8))], width * (bpp / 8));                                  in_uint8a(s, &bmpdata[(height - y - 1) * (width * Bpp)], width * Bpp);
587                          }                          }
588                          ui_paint_bitmap(left, top, cx, cy, width, height, bmpdata);                          ui_paint_bitmap(left, top, cx, cy, width, height, bmpdata);
589                          xfree(bmpdata);                          xfree(bmpdata);
# Line 593  process_bitmap_updates(STREAM s) Line 594  process_bitmap_updates(STREAM s)
594                  in_uint16_le(s, size);                  in_uint16_le(s, size);
595                  in_uint8s(s, 4);        /* line_size, final_size */                  in_uint8s(s, 4);        /* line_size, final_size */
596                  in_uint8p(s, data, size);                  in_uint8p(s, data, size);
597                  bmpdata = xmalloc(width * height * (bpp / 8));                  bmpdata = xmalloc(width * height * Bpp);
598                  if (bitmap_decompress(bmpdata, width, height, data, size, bpp))                  if (bitmap_decompress(bmpdata, width, height, data, size, Bpp))
599                  {                  {
600                          ui_paint_bitmap(left, top, cx, cy, width, height, bmpdata);                          ui_paint_bitmap(left, top, cx, cy, width, height, bmpdata);
601                  }                  }

Legend:
Removed from v.309  
changed lines
  Added in v.314

  ViewVC Help
Powered by ViewVC 1.1.26