Discuss the development of new homebrew software, tools and libraries.
	Moderators:  cheriff , TyRaNiD 
			
		
		
			
				
																			
								nikocronaldo 							 
									
		Posts:  31 Joined:  Sun Feb 24, 2008 7:19 am 
		
						
					
													
							
						
									
						Post 
					 
								by nikocronaldo  Sun Mar 16, 2008 7:06 am 
			
			
			
			
			if i want press two buttons to make a function,what do I put?
i saw this but it only works a button,i want the two buttons.
Code: Select all 
if ((pad.Buttons & PSP_CTRL_START && pad.Buttons & PSP_CTRL_CROSS))
what do I do?
 
		 
				
		
		 
	 
				
		
		
			
				
																			
								pspZorba 							 
									
		Posts:  156 Joined:  Sat Sep 22, 2007 11:45 amLocation:  NY 
		
						
					
						 
													
							
						
									
						Post 
					 
								by pspZorba  Sun Mar 16, 2008 7:41 am 
			
			
			
			
			if (pad.Buttons &(PSP_CTRL_START| PSP_CTRL_CROSS) )
			
			
									
									--pspZorba--
						 
		 
				
		
		 
	 
				
		
		
			
				
																			
								nikocronaldo 							 
									
		Posts:  31 Joined:  Sun Feb 24, 2008 7:19 am 
		
						
					
						 
													
							
						
									
						Post 
					 
								by nikocronaldo  Sun Mar 16, 2008 8:47 am 
			
			
			
			
			it doesn't work,or work START,or work CROSS.
			
			
									
									
						 
		 
				
		
		 
	 
				
		
		
			
				
																			
								crazyc 							 
									
		Posts:  408 Joined:  Fri Jun 17, 2005 10:13 am 
		
						
					
						 
													
							
						
									
						Post 
					 
								by crazyc  Sun Mar 16, 2008 9:39 am 
			
			
			
			
			if ((pad.Buttons & (PSP_CTRL_START|PSP_CTRL_CROSS)) == (PSP_CTRL_START|PSP_CTRL_CROSS))
			
			
									
									
						 
		 
				
		
		 
	 
				
		
		
			
				
																			
								pspZorba 							 
									
		Posts:  156 Joined:  Sat Sep 22, 2007 11:45 amLocation:  NY 
		
						
					
						 
													
							
						
									
						Post 
					 
								by pspZorba  Sun Mar 16, 2008 9:49 am 
			
			
			
			
			oups, I do always the same mistake ;-)
			
			
									
									--pspZorba--
						 
		 
				
		
		 
	 
				
		
		
			
				
																			
								Art 							 
									
		Posts:  643 Joined:  Wed Nov 09, 2005 8:01 am 
		
						
					
						 
													
							
						
									
						Post 
					 
								by Art  Sun Mar 16, 2008 1:08 pm 
			
			
			
			
			or:
Code: Select all 
if (currentPad.Buttons &PSP_CTRL_START) {
// start is pressed
if (currentPad.Buttons &PSP_CTRL_CROSS) {
// start and cross are pressed
}
}
not the sort of thing that belongs here really.
If not actually, then potentially.
						 
		 
				
		
		 
	 
				
		
		
			
				
																			
								J.F. 							 
									
		Posts:  2906 Joined:  Sun Feb 22, 2004 11:41 am 
		
						
					
						 
													
							
						
									
						Post 
					 
								by J.F.  Sun Mar 16, 2008 4:33 pm 
			
			
			
			
			Yeah. All you're doing here is testing if two bits in an unsigned integer are both set. If you can't already do that, you probably need some remedial C lessons, which we don't do here.