summaryrefslogtreecommitdiff
path: root/src/joystick.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-08-22 11:35:54 +0300
committerAndrei Karas <akaras@inbox.ru>2013-08-24 21:08:15 +0300
commit07390a4c8dcde85602c1a91d3773061d67d169ab (patch)
tree2128313bf3f5612d036cc35d71b2867b276b54e2 /src/joystick.cpp
parent89f6264172de327a53db26cdc15b475ca3c7e62e (diff)
downloadplus-07390a4c8dcde85602c1a91d3773061d67d169ab.tar.gz
plus-07390a4c8dcde85602c1a91d3773061d67d169ab.tar.bz2
plus-07390a4c8dcde85602c1a91d3773061d67d169ab.tar.xz
plus-07390a4c8dcde85602c1a91d3773061d67d169ab.zip
add some more fixes for SDL2 compilation.
Diffstat (limited to 'src/joystick.cpp')
-rw-r--r--src/joystick.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/joystick.cpp b/src/joystick.cpp
index 324de047d..244996937 100644
--- a/src/joystick.cpp
+++ b/src/joystick.cpp
@@ -26,6 +26,7 @@
#include "configuration.h"
#include "inputmanager.h"
#include "logger.h"
+#include "sdlshared.h"
#include "debug.h"
@@ -65,7 +66,7 @@ void Joystick::init()
joystickCount = SDL_NumJoysticks();
logger->log("%i joysticks/gamepads found", joystickCount);
for (int i = 0; i < joystickCount; i++)
- logger->log("- %s", SDL_JoystickName(i));
+ logger->log("- %s", SDL_JoystickNameForIndex(i));
mEnabled = config.getBoolValue("joystickEnabled");
@@ -268,7 +269,7 @@ void Joystick::getNames(std::vector <std::string> &names)
{
names.clear();
for (int i = 0; i < joystickCount; i++)
- names.push_back(SDL_JoystickName(i));
+ names.push_back(SDL_JoystickNameForIndex(i));
}
void Joystick::update()