JoyStick in SDL

Started by
2 comments, last by blackcloak 16 years, 2 months ago
hi i have some question about controling joystick in the SDL,my question are: 1.how can control joysticks buttons state without event( for example in can get mouse state without checking events whit SDL_GetMouseState function)? 2.how can i turn on joystick vibration in my app?
Advertisement
1)Use the following functions
SDL_JoystickGetAxis
SDL_JoystickGetHat
SDL_JoystickGetButton
SDL_JoystickGetBall
Look at the SDL wiki doc for more information on the functions.

2)SDL does not support joystick vibration. You will have to do that through a third party LIB or OS/driver API.
Black CloakEpee Engine.
hi
thanks for answering my questions

what is windows APIs for using joystick vibration?
For windows i would suggest the DirectInput (which is part of DirectX) API.
Black CloakEpee Engine.

This topic is closed to new replies.

Advertisement