/[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 1041 by astrand, Mon Aug 8 19:15:57 2005 UTC revision 1042 by astrand, Tue Jan 24 12:40:24 2006 UTC
# Line 44  extern BOOL g_polygon_ellipse_orders; Line 44  extern BOOL g_polygon_ellipse_orders;
44  extern BOOL g_use_rdp5;  extern BOOL g_use_rdp5;
45  extern uint16 g_server_rdp_version;  extern uint16 g_server_rdp_version;
46  extern uint32 g_rdp5_performanceflags;  extern uint32 g_rdp5_performanceflags;
47  extern int g_server_bpp;  extern int g_server_depth;
48  extern int g_width;  extern int g_width;
49  extern int g_height;  extern int g_height;
50  extern BOOL g_bitmap_cache;  extern BOOL g_bitmap_cache;
# Line 620  rdp_out_bitmap_caps(STREAM s) Line 620  rdp_out_bitmap_caps(STREAM s)
620          out_uint16_le(s, RDP_CAPSET_BITMAP);          out_uint16_le(s, RDP_CAPSET_BITMAP);
621          out_uint16_le(s, RDP_CAPLEN_BITMAP);          out_uint16_le(s, RDP_CAPLEN_BITMAP);
622    
623          out_uint16_le(s, g_server_bpp); /* Preferred BPP */          out_uint16_le(s, g_server_depth);       /* Preferred colour depth */
624          out_uint16_le(s, 1);    /* Receive 1 BPP */          out_uint16_le(s, 1);    /* Receive 1 BPP */
625          out_uint16_le(s, 1);    /* Receive 4 BPP */          out_uint16_le(s, 1);    /* Receive 4 BPP */
626          out_uint16_le(s, 1);    /* Receive 8 BPP */          out_uint16_le(s, 1);    /* Receive 8 BPP */
# Line 684  rdp_out_bmpcache_caps(STREAM s) Line 684  rdp_out_bmpcache_caps(STREAM s)
684          out_uint16_le(s, RDP_CAPSET_BMPCACHE);          out_uint16_le(s, RDP_CAPSET_BMPCACHE);
685          out_uint16_le(s, RDP_CAPLEN_BMPCACHE);          out_uint16_le(s, RDP_CAPLEN_BMPCACHE);
686    
687          Bpp = (g_server_bpp + 7) / 8;          Bpp = (g_server_depth + 7) / 8; /* bytes per pixel */
688          out_uint8s(s, 24);      /* unused */          out_uint8s(s, 24);      /* unused */
689          out_uint16_le(s, 0x258);        /* entries */          out_uint16_le(s, 0x258);        /* entries */
690          out_uint16_le(s, 0x100 * Bpp);  /* max cell size */          out_uint16_le(s, 0x100 * Bpp);  /* max cell size */
# Line 881  rdp_process_general_caps(STREAM s) Line 881  rdp_process_general_caps(STREAM s)
881  static void  static void
882  rdp_process_bitmap_caps(STREAM s)  rdp_process_bitmap_caps(STREAM s)
883  {  {
884          uint16 width, height, bpp;          uint16 width, height, depth;
885    
886          in_uint16_le(s, bpp);          in_uint16_le(s, depth);
887          in_uint8s(s, 6);          in_uint8s(s, 6);
888    
889          in_uint16_le(s, width);          in_uint16_le(s, width);
890          in_uint16_le(s, height);          in_uint16_le(s, height);
891    
892          DEBUG(("setting desktop size and bpp to: %dx%dx%d\n", width, height, bpp));          DEBUG(("setting desktop size and depth to: %dx%dx%d\n", width, height, depth));
893    
894          /*          /*
895           * The server may limit bpp and change the size of the desktop (for           * The server may limit depth and change the size of the desktop (for
896           * example when shadowing another session).           * example when shadowing another session).
897           */           */
898          if (g_server_bpp != bpp)          if (g_server_depth != depth)
899          {          {
900                  warning("colour depth changed from %d to %d\n", g_server_bpp, bpp);                  warning("Remote desktop does not support colour depth %d; falling back to %d\n",
901                  g_server_bpp = bpp;                          g_server_depth, depth);
902                    g_server_depth = depth;
903          }          }
904          if (g_width != width || g_height != height)          if (g_width != width || g_height != height)
905          {          {
906                  warning("screen size changed from %dx%d to %dx%d\n", g_width, g_height,                  warning("Remote desktop changed from %dx%d to %dx%d.\n", g_width, g_height,
907                          width, height);                          width, height);
908                  g_width = width;                  g_width = width;
909                  g_height = height;                  g_height = height;

Legend:
Removed from v.1041  
changed lines
  Added in v.1042

  ViewVC Help
Powered by ViewVC 1.1.26