summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon/Src/ControllerInterface/SDL/SDL.cpp
diff options
context:
space:
mode:
authorRyan Houdek <Sonicadvance1@gmail.com>2013-11-13 16:17:42 -0600
committerRyan Houdek <Sonicadvance1@gmail.com>2013-11-13 16:17:42 -0600
commit2a23bdde6f76c0bff0906bbbee298480b52ba0c2 (patch)
tree22a7bccfb1cb25d4c9f247ca3d43904a4a6d79dc /Source/Core/InputCommon/Src/ControllerInterface/SDL/SDL.cpp
parent3c7613fc83981f9ef8efa2e4ac478af9fe23bdec (diff)
parent63a9dff3bb8c88cdc5b941db1f3813843c7a8564 (diff)
Merge branch 'master' into android-new-control-input-overlay
Conflicts: Source/Core/DolphinWX/Src/Android/ButtonManager.h
Diffstat (limited to 'Source/Core/InputCommon/Src/ControllerInterface/SDL/SDL.cpp')
-rw-r--r--Source/Core/InputCommon/Src/ControllerInterface/SDL/SDL.cpp26
1 files changed, 11 insertions, 15 deletions
diff --git a/Source/Core/InputCommon/Src/ControllerInterface/SDL/SDL.cpp b/Source/Core/InputCommon/Src/ControllerInterface/SDL/SDL.cpp
index 40c822c577..bcd3586dc6 100644
--- a/Source/Core/InputCommon/Src/ControllerInterface/SDL/SDL.cpp
+++ b/Source/Core/InputCommon/Src/ControllerInterface/SDL/SDL.cpp
@@ -7,18 +7,14 @@
#include <algorithm>
#ifdef _WIN32
- #if SDL_VERSION_ATLEAST(1, 3, 0)
- #pragma comment(lib, "SDL.1.3.lib")
- #else
- #pragma comment(lib, "SDL.lib")
- #endif
+#pragma comment(lib, "SDL2.lib")
#endif
namespace ciface
{
namespace SDL
{
-
+
std::string GetJoystickName(int index)
{
#if SDL_VERSION_ATLEAST(2, 0, 0)
@@ -29,7 +25,7 @@ std::string GetJoystickName(int index)
}
void Init( std::vector<Core::Device*>& devices )
-{
+{
// this is used to number the joysticks
// multiple joysticks with the same name shall get unique ids starting at 0
std::map<std::string, int> name_counts;
@@ -83,7 +79,7 @@ Joystick::Joystick(SDL_Joystick* const joystick, const int sdl_index, const unsi
// get buttons
for (u8 i = 0; i != SDL_JoystickNumButtons(m_joystick); ++i)
AddInput(new Button(i, m_joystick));
-
+
// get hats
for (u8 i = 0; i != SDL_JoystickNumHats(m_joystick); ++i)
{
@@ -155,7 +151,7 @@ Joystick::~Joystick()
{
#ifdef USE_SDL_HAPTIC
if (m_haptic)
- {
+ {
// stop/destroy all effects
SDL_HapticStopAll(m_haptic);
std::list<EffectIDState>::iterator
@@ -201,7 +197,7 @@ std::string Joystick::TriangleEffect::GetName() const
return "Triangle";
}
-void Joystick::ConstantEffect::SetState(const ControlState state)
+void Joystick::ConstantEffect::SetState(ControlState state)
{
if (state)
{
@@ -219,7 +215,7 @@ void Joystick::ConstantEffect::SetState(const ControlState state)
m_effect.changed = true;
}
-void Joystick::RampEffect::SetState(const ControlState state)
+void Joystick::RampEffect::SetState(ControlState state)
{
if (state)
{
@@ -237,7 +233,7 @@ void Joystick::RampEffect::SetState(const ControlState state)
m_effect.changed = true;
}
-void Joystick::SineEffect::SetState(const ControlState state)
+void Joystick::SineEffect::SetState(ControlState state)
{
if (state)
{
@@ -260,7 +256,7 @@ void Joystick::SineEffect::SetState(const ControlState state)
}
#ifdef SDL_HAPTIC_SQUARE
-void Joystick::SquareEffect::SetState(const ControlState state)
+void Joystick::SquareEffect::SetState(ControlState state)
{
if (state)
{
@@ -283,7 +279,7 @@ void Joystick::SquareEffect::SetState(const ControlState state)
}
#endif // defined(SDL_HAPTIC_SQUARE)
-void Joystick::TriangleEffect::SetState(const ControlState state)
+void Joystick::TriangleEffect::SetState(ControlState state)
{
if (state)
{
@@ -310,7 +306,7 @@ bool Joystick::UpdateInput()
{
// each joystick is doin this, o well
SDL_JoystickUpdate();
-
+
return true;
}