예제 #1
0
static bool gx_joypad_init(void *data)
{
   int i;
   SYS_SetResetCallback(reset_cb);
#ifdef HW_RVL
   SYS_SetPowerCallback(power_callback);
#endif

   (void)data;

   for (i = 0; i < MAX_PADS; i++)
      pad_type[i] = WPAD_EXP_NOCONTROLLER;

   PAD_Init();
#ifdef HW_RVL
   WPADInit();
#ifdef HAVE_LIBSICKSAXIS
   ss_init(sixaxis, USB_SLOTS);
#endif
#endif

   gx_joypad_poll();

   return true;
}
예제 #2
0
CInputWii::CInputWii()
{
	s32 wpad_state;
    s32 status;
    u32 type;
    u32 index;

	//eWPADStatus wpad;
    //e memset( (void *)(&wpad), 0, sizeof(WPADStatus));

	//orkprintf("created Dummy Input Device\n");
	WPADRegisterAllocator(myAlloc, myFree);

#if WPAD
	WPADInit();
	do
    {
       wpad_state = WPADGetStatus();
    } while (WPAD_STATE_SETUP != wpad_state);
#else
    KPADInit() ;		// Controller
    KPADSetControlDpdCallback(0, dpd_callback);
    KPADSetSamplingCallback(0, sampling_callback);

    KPADReset() ;
    KPADSetPosParam ( 0,  pos_play_radius,  pos_sensitivity ) ;
    KPADSetHoriParam( 0, hori_play_radius, hori_sensitivity ) ;
    KPADSetDistParam( 0, dist_play_radius, dist_sensitivity ) ;
    KPADSetAccParam ( 0,  acc_play_radius,  acc_sensitivity ) ;
    KPADSetBtnRepeat( 0, repeat_delay_sec, repeat_pulse_sec ) ;


	PADInit();

	KPADDisableStickCrossClamp() ;
	WPADSetAutoSleepTime(5);

#endif


}
예제 #3
0
static bool gx_joypad_init(void)
{
   SYS_SetResetCallback(reset_cb);
#ifdef HW_RVL
   SYS_SetPowerCallback(power_callback);
#endif

   PAD_Init();
#ifdef HW_RVL
   WPADInit();
#endif
#ifdef HAVE_LIBSICKSAXIS
   int i;
   USB_Initialize();
   ss_init();
   for (i = 0; i < MAX_PADS; i++)
      ss_initialize(&dev[i]);
#endif

   gx_joypad_poll();

   return true;
}