1
0
mirror of git://projects.qi-hardware.com/gmenu2x.git synced 2024-11-22 23:10:37 +02:00

InputManager: SDL_NumJoysticks is a function, try calling it.

This commit is contained in:
Maarten ter Huurne 2011-10-23 07:22:55 +02:00
parent ae685a9729
commit 0cb1645c03

View File

@ -40,15 +40,17 @@ InputManager::InputManager() {
InputManager::~InputManager() {
if (SDL_NumJoysticks > 0)
if (SDL_NumJoysticks() > 0) {
SDL_JoystickClose(joystick);
}
}
void InputManager::initJoystick() {
if (SDL_NumJoysticks > 0)
if (SDL_NumJoysticks() > 0) {
joystick = SDL_JoystickOpen(0);
}
}
bool InputManager::readConfFile(const string &conffile) {