iOS/libraries/allegro/allegro/src/psp/pjoy.c
/* psp_joy_poll:
 *  Polls the active joystick devices and updates internal states.
 */
Polls the active joystick devices and updates internal states.
Polls the active joystick devices and updates internal states .
static int psp_joy_poll(void)
{
   SceCtrlData pad;
   int buffers_to_read = 1;
   uint8_t b;
   sceCtrlPeekBufferPositive(&pad, buffers_to_read);
   for (b=0; b<NBUTTONS; b++)
      joy[0].button[b].b = pad.Buttons & psp_controller_buttons[b].code;
   joy[0].stick[0].axis[0].d1 = pad.Buttons & PSP_CTRL_LEFT;
   joy[0].stick[0].axis[0].d2 = pad.Buttons & PSP_CTRL_RIGHT;
   joy[0].stick[0].axis[1].d1 = pad.Buttons & PSP_CTRL_UP;
   joy[0].stick[0].axis[1].d2 = pad.Buttons & PSP_CTRL_DOWN;
   return 0;
}
static int psp_joy_poll ( void ) { SceCtrlData pad ; int buffers_to_read = 1 ; uint8_t b ; sceCtrlPeekBufferPositive ( & pad , buffers_to_read ) ; for ( b = 0 ; b < NBUTTONS ; b ++ ) joy [ 0 ] . button [ b ] . b = pad . Buttons & psp_controller_buttons [ b ] . code ; joy [ 0 ] . stick [ 0 ] . axis [ 0 ] . d1 = pad . Buttons & PSP_CTRL_LEFT ; joy [ 0 ] . stick [ 0 ] . axis [ 0 ] . d2 = pad . Buttons & PSP_CTRL_RIGHT ; joy [ 0 ] . stick [ 0 ] . axis [ 1 ] . d1 = pad . Buttons & PSP_CTRL_UP ; joy [ 0 ] . stick [ 0 ] . axis [ 1 ] . d2 = pad . Buttons & PSP_CTRL_DOWN ; return 0 ; }
psp_joy_poll:
  Polls the active joystick devices and updates internal states.
psp_joy_poll : Polls the active joystick devices and updates internal states .
/* Report the status of the no directional buttons. */ /* Report the status of the directional buttons. */