History

add a missing HAVE_SDL block

Stephen Birarda committed 12 years ago

Commit 3ab24d61 parent 875c1db1 file · +2 −0Browse files

Showing the changes to interface/src/scripting/JoystickScriptingInterface.cpp (1 of 1 file). Show all

Unified · Split

interface/src/scripting/JoystickScriptingInterface.cpp+2−0
@@ -62,6 +62,7 @@ void JoystickScriptingInterface::update() { · 61 unmodified lines
62 62
63Joystick* JoystickScriptingInterface::joystickWithName(const QString& name) {63Joystick* JoystickScriptingInterface::joystickWithName(const QString& name) {
64 Joystick* matchingJoystick = _openJoysticks.value(name);64 Joystick* matchingJoystick = _openJoysticks.value(name);
65#ifdef HAVE_SDL
65 if (!matchingJoystick) {66 if (!matchingJoystick) {
66 // we haven't opened a joystick with this name yet - enumerate our SDL devices and see if it exists67 // we haven't opened a joystick with this name yet - enumerate our SDL devices and see if it exists
67 int joystickCount = SDL_NumJoysticks();68 int joystickCount = SDL_NumJoysticks();
@@ -75,6 +76,7 @@ Joystick* JoystickScriptingInterface::joystickWithName(const QString& name) { · 7 unmodified lines
75 76
76 qDebug() << "No matching joystick found with name" << name << "- returning NULL pointer.";77 qDebug() << "No matching joystick found with name" << name << "- returning NULL pointer.";
77 }78 }
79#endif
78 80
79 return matchingJoystick;81 return matchingJoystick;
80}82}