CVS: rdesktop rdp.c,1.52,1.53

Jay Sorg <[email protected]>
Newsgroups gmane.network.rdesktop.cvs
Message-ID <[email protected]>
Update of /cvsroot/rdesktop/rdesktop
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1137

Modified Files:
	rdp.c 
Log Message:
move color fallback from process_bitmap_updates to process_demand_active

Index: rdp.c
===================================================================
RCS file: /cvsroot/rdesktop/rdesktop/rdp.c,v
retrieving revision 1.52
retrieving revision 1.53
diff -C2 -d -r1.52 -r1.53
*** rdp.c	15 Mar 2004 14:49:12 -0000	1.52
--- rdp.c	15 Apr 2004 22:03:24 -0000	1.53
***************
*** 410,414 ****
  	out_uint16_le(s, RDP_CAPLEN_BITMAP);
  
! 	out_uint16_le(s, 8);	/* Preferred BPP */
  	out_uint16_le(s, 1);	/* Receive 1 BPP */
  	out_uint16_le(s, 1);	/* Receive 4 BPP */
--- 410,414 ----
  	out_uint16_le(s, RDP_CAPLEN_BITMAP);
  
! 	out_uint16_le(s, g_server_bpp);	/* Preferred BPP */
  	out_uint16_le(s, 1);	/* Receive 1 BPP */
  	out_uint16_le(s, 1);	/* Receive 4 BPP */
***************
*** 619,625 ****
--- 619,651 ----
  {
  	uint8 type;
+ 	uint16 i;
+ 	uint16 p_bpp;
  
  	in_uint32_le(s, g_rdp_shareid);
  
+ 	/* scan for prefered bpp */
+ 	while (s_check_rem(s, 6))
+ 	{
+ 		in_uint16_le(s, i);
+ 		if (i == RDP_CAPSET_BITMAP)
+ 		{
+ 			in_uint16_le(s, i);
+ 			if (i == RDP_CAPLEN_BITMAP)
+ 			{
+ 				in_uint16_le(s, p_bpp);
+ 				if (p_bpp == 8 || p_bpp == 15 || p_bpp == 16 || p_bpp == 24)
+ 				{
+ 					if (p_bpp < g_server_bpp)
+ 					{
+ 						warning("Server limited colour depth to %d bits\n", p_bpp);
+ 						g_server_bpp = p_bpp;
+ 					}
+ 					break;
+ 				}
+ 			}
+ 		}
+ 	}
+ 
+ 
  	DEBUG(("DEMAND_ACTIVE(id=0x%x)\n", g_rdp_shareid));
  
***************
*** 755,765 ****
  		       left, top, right, bottom, width, height, Bpp, compress));
  
- 		/* Server may limit bpp - this is how we find out */
- 		if (g_server_bpp != bpp)
- 		{
- 			warning("Server limited colour depth to %d bits\n", bpp);
- 			g_server_bpp = bpp;
- 		}
- 
  		if (!compress)
  		{
--- 781,784 ----



-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.