summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon/Src/ControllerInterface
diff options
context:
space:
mode:
authorJordan Woyak <jordan.woyak@gmail.com>2013-02-05 15:32:13 -0600
committerJordan Woyak <jordan.woyak@gmail.com>2013-02-05 15:34:23 -0600
commit708fed92c851ada9dbe191b20eafa14c378ca664 (patch)
tree632633f49754e50f88447d2ac15489dcefe83a43 /Source/Core/InputCommon/Src/ControllerInterface
parentf506783c37b2bd7b50bf86015a030d7e0a74ff29 (diff)
Clean up SDL includes a bit. Maybe fix an SDL2 problem.
Diffstat (limited to 'Source/Core/InputCommon/Src/ControllerInterface')
-rw-r--r--Source/Core/InputCommon/Src/ControllerInterface/SDL/SDL.cpp8
-rw-r--r--Source/Core/InputCommon/Src/ControllerInterface/SDL/SDL.h12
2 files changed, 9 insertions, 11 deletions
diff --git a/Source/Core/InputCommon/Src/ControllerInterface/SDL/SDL.cpp b/Source/Core/InputCommon/Src/ControllerInterface/SDL/SDL.cpp
index 5473f7bcb3..b521032e9c 100644
--- a/Source/Core/InputCommon/Src/ControllerInterface/SDL/SDL.cpp
+++ b/Source/Core/InputCommon/Src/ControllerInterface/SDL/SDL.cpp
@@ -325,7 +325,13 @@ bool Joystick::UpdateOutput()
std::string Joystick::GetName() const
{
- return StripSpaces(SDL_JoystickName(m_sdl_index));
+ return StripSpaces(
+#if SDL_VERSION_ATLEAST(2, 0, 0)
+ SDL_JoystickNameForIndex(m_sdl_index)
+#else
+ SDL_JoystickName(m_sdl_index)
+#endif
+ );
}
std::string Joystick::GetSource() const
diff --git a/Source/Core/InputCommon/Src/ControllerInterface/SDL/SDL.h b/Source/Core/InputCommon/Src/ControllerInterface/SDL/SDL.h
index 139e9f232d..fa770c403d 100644
--- a/Source/Core/InputCommon/Src/ControllerInterface/SDL/SDL.h
+++ b/Source/Core/InputCommon/Src/ControllerInterface/SDL/SDL.h
@@ -5,22 +5,14 @@
#include <list>
-#ifdef _WIN32
- #include <SDL.h>
-#else
- #include <SDL/SDL.h>
-#endif
+#include <SDL.h>
#if SDL_VERSION_ATLEAST(1, 3, 0)
#define USE_SDL_HAPTIC
#endif
#ifdef USE_SDL_HAPTIC
- #ifdef _WIN32
- #include <SDL_haptic.h>
- #else
- #include <SDL/SDL_haptic.h>
- #endif
+ #include <SDL_haptic.h>
#define SDL_INIT_FLAGS SDL_INIT_JOYSTICK | SDL_INIT_HAPTIC
#else
#define SDL_INIT_FLAGS SDL_INIT_JOYSTICK