Fixed the number of supported joysticks in sf::Input

git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/trunk@1327 4e206d99-4929-0410-ac5d-dfc041789085
This commit is contained in:
LaurentGom 2010-01-06 08:36:55 +00:00
parent 42b97d230f
commit e2d0ffcdcf
3 changed files with 56 additions and 42 deletions

View file

@ -117,15 +117,30 @@ private :
////////////////////////////////////////////////////////////
virtual void OnEvent(const Event& EventReceived);
////////////////////////////////////////////////////////////
/// Reset all the states
///
////////////////////////////////////////////////////////////
void ResetStates();
////////////////////////////////////////////////////////////
// Joystick limits
////////////////////////////////////////////////////////////
enum
{
NbJoysticks = 4,
NbJoystickButtons = 32
};
////////////////////////////////////////////////////////////
// Member data
////////////////////////////////////////////////////////////
bool myKeys[Key::Count]; ///< Array containing the state of all keyboard keys
bool myMouseButtons[Mouse::Count]; ///< Array containing the state of all mouse buttons
bool myJoystickButtons[2][16]; ///< Array containing the state of all joysticks buttons
int myMouseX; ///< Mouse position on X
int myMouseY; ///< Mouse position on Y
float myJoystickAxis[2][Joy::Count]; ///< Joysticks position on each axis
bool myKeys[Key::Count]; ///< Array containing the state of all keyboard keys
bool myMouseButtons[Mouse::Count]; ///< Array containing the state of all mouse buttons
int myMouseX; ///< Mouse position on X
int myMouseY; ///< Mouse position on Y
bool myJoystickButtons[NbJoysticks][NbJoystickButtons]; ///< Array containing the state of all joysticks buttons
float myJoystickAxis[NbJoysticks][Joy::Count]; ///< Joysticks position on each axis
};
} // namespace sf