@ -390,19 +390,23 @@ static void SDLash_EventFilter( SDL_Event *event )
/* Joystick events */
/* Joystick events */
case SDL_JOYAXISMOTION :
case SDL_JOYAXISMOTION :
if ( SDL_GameControllerFromInstanceID ( event - > jaxis . which ) = = NULL )
Joy_AxisMotionEvent ( event - > jaxis . axis , event - > jaxis . value ) ;
Joy_AxisMotionEvent ( event - > jaxis . axis , event - > jaxis . value ) ;
break ;
break ;
case SDL_JOYBALLMOTION :
case SDL_JOYBALLMOTION :
if ( SDL_GameControllerFromInstanceID ( event - > jball . which ) = = NULL )
Joy_BallMotionEvent ( event - > jball . ball , event - > jball . xrel , event - > jball . yrel ) ;
Joy_BallMotionEvent ( event - > jball . ball , event - > jball . xrel , event - > jball . yrel ) ;
break ;
break ;
case SDL_JOYHATMOTION :
case SDL_JOYHATMOTION :
if ( SDL_GameControllerFromInstanceID ( event - > jhat . which ) = = NULL )
Joy_HatMotionEvent ( event - > jhat . hat , event - > jhat . value ) ;
Joy_HatMotionEvent ( event - > jhat . hat , event - > jhat . value ) ;
break ;
break ;
case SDL_JOYBUTTONDOWN :
case SDL_JOYBUTTONDOWN :
case SDL_JOYBUTTONUP :
case SDL_JOYBUTTONUP :
if ( SDL_GameControllerFromInstanceID ( event - > jbutton . which ) = = NULL )
Joy_ButtonEvent ( event - > jbutton . button , event - > jbutton . state ) ;
Joy_ButtonEvent ( event - > jbutton . button , event - > jbutton . state ) ;
break ;
break ;
@ -514,7 +518,7 @@ static void SDLash_EventFilter( SDL_Event *event )
// TODO: Use joyinput funcs, for future multiple gamepads support
// TODO: Use joyinput funcs, for future multiple gamepads support
if ( Joy_IsActive ( ) )
if ( Joy_IsActive ( ) )
Key_Event ( sdlControllerButtonToEngine [ event - > cbutton . button ] , event - > cbutton . state ) ;
Key_Event ( sdlControllerButtonToEngine [ event - > cbutton . button + 1 ] , event - > cbutton . state ) ;
break ;
break ;
}
}