when the user trys to select a number it doesn't stop one by one,instead it rokets all the way to the top of the menu.
this is the code for better understanding of my problem:
Code: Select all
	
//I want to put something that pauses the counter until the user presses up again.
                                                                                                
while(1)//while 1                                                                         
	{                                                                                       
			sceCtrlReadBufferPositive(&pad, 1);                     
                                                                                                
			if (pad.Buttons & PSP_CTRL_UP)                          
			{                                                                       
				num1++ ;                                                  
               Here   <------------
		     if (num1 <= 1)
				 {
				 num1 = 1;
			 }
				 else if (num1 >= 9)
				 {
					 num1 = 9;
				 }
				 else if (num1 == 1)
				 {
					 num1 = 1;
					 pspDebugScreenSetXY(28,16);
	                 printf("%d",num1);
				 }
				 else if (num1 == 2)
				 {
					 num1 = 2;
					 pspDebugScreenSetXY(28,16);
	                 printf("%d",num1);
				 }
				 else if (num1 == 3)
				 {
					 num1 = 3;
					 pspDebugScreenSetXY(28,16);
	                 printf("%d",num1);
				 }
			}
			else if (pad.Buttons & PSP_CTRL_DOWN)
			{
				num1-- ;
		     if (num1 <= 1)
				 {
				 num1 = 1;
			 }
				 else if (num1 >= 9)
				 {
					 num1 = 9;
				 }
			}
			 if (pad.Buttons & PSP_CTRL_CROSS)
			 {
              fclose (file);
			  sceKernelExitGame();
			 }
		}
		}Help will be Appriciated.
