engine/sdl/control.c
/*
Create default values for joysticks if enabled.
Then scan for joysticks and update their data.
*/
Create default values for joysticks if enabled.
Then scan for joysticks and update their data.
Create default values for joysticks if enabled . Then scan for joysticks and update their data .
void control_init(int joy_enable)
{
	int i;
#ifdef GP2X
	usejoy = joy_enable ? joy_enable : 1;
#else
	usejoy = joy_enable;
#endif
	for(i = 0; i < JOY_LIST_TOTAL; i++)
	{
        joystick[i] = NULL;
        joystick_haptic[i] = NULL;
		reset_joystick_map(i);
	}
	joystick_scan(usejoy);
#ifdef ANDROID
	for(i = 0; i < MAX_POINTERS; i++)
    {
        touch_info.pstatus[i] = TOUCH_STATUS_UP;
    }
#endif
}
void control_init ( int joy_enable ) { int i ; #ifdef GP2X usejoy = joy_enable ? joy_enable : 1 ; #else usejoy = joy_enable ; #endif for ( i = 0 ; i < JOY_LIST_TOTAL ; i ++ ) { joystick [ i ] = NULL ; joystick_haptic [ i ] = NULL ; reset_joystick_map ( i ) ; } joystick_scan ( usejoy ) ; #ifdef ANDROID for ( i = 0 ; i < MAX_POINTERS ; i ++ ) { touch_info . pstatus [ i ] = TOUCH_STATUS_UP ; } #endif }
Create default values for joysticks if enabled.
Create default values for joysticks if enabled .
//memset(joysticks, 0, sizeof(s_joysticks) * JOY_LIST_TOTAL);