Discuss the development of new homebrew software, tools and libraries.
	Moderators:  cheriff , TyRaNiD 
			
		
		
			
				
																			
								Neizan 							 
									
		Posts:  10 Joined:  Wed Oct 31, 2007 8:19 am 
		
						
					
													
							
						
									
						Post 
					 
								by Neizan  Fri Nov 02, 2007 3:06 am 
			
			
			
			
			Hi,
I've just started in the PSP programming. I'm coding simple programs for learn step by step, searching for the net every question I have. But I can't find how to control when the joystick is used.
I know how control the other buttons:
Code: Select all 
if(pad.Buttons & PSP_CTRL_UP){...}
if(pad.Buttons & PSP_CTRL_SQUARE){...}
...}
but I haven't found anything about the joystick. I have found a function call:
Code: Select all 
sceCtrlSetSamplingMode(PSP_CTRL_MODE_ANALOG);
but I don't know how exactly it works... or if it's just not related with the analog joystick.
Can anyone help me?
 
		 
				
		
		 
	 
				
		
		
			
				
								Raphael 							 
									
		Posts:  646 Joined:  Tue Jan 17, 2006 4:54 pmLocation:  Germany
				Contact: 
				
			 
				
		 
		
						
					
													
							
						
									
						Post 
					 
								by Raphael  Fri Nov 02, 2007 3:15 am 
			
			
			
			
			see pspsdk\src\samples\controller\basic
			
			
									
									
						 
		 
				
		
		 
	 
				
		
		
			
				
																			
								Ghoti 							 
									
		Posts:  288 Joined:  Sat Dec 31, 2005 11:06 pm 
		
						
					
						 
													
							
						
									
						Post 
					 
								by Ghoti  Fri Nov 02, 2007 4:49 am 
			
			
			
			
			Hi I have some info on it in my controls tutorial:
http://www.ghoti.nl/PSPtutorialm5.php 
hope it helps
P.S. don't forget to look at the tips section, it covers how the analog stick works and some nice info to use it without problems :)
 
		 
				
		
		 
	 
				
		
		
			
				
																			
								Neizan 							 
									
		Posts:  10 Joined:  Wed Oct 31, 2007 8:19 am 
		
						
					
						 
													
							
						
									
						Post 
					 
								by Neizan  Fri Nov 02, 2007 7:16 am 
			
			
			
			
			Raphael, thanks for your fast answer ^^