mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-04-10 03:44:26 +00:00
Clean up SDL includes a bit. Maybe fix an SDL2 problem.
This commit is contained in:
parent
f506783c37
commit
708fed92c8
@ -325,7 +325,13 @@ bool Joystick::UpdateOutput()
|
|||||||
|
|
||||||
std::string Joystick::GetName() const
|
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
|
std::string Joystick::GetSource() const
|
||||||
|
@ -5,22 +5,14 @@
|
|||||||
|
|
||||||
#include <list>
|
#include <list>
|
||||||
|
|
||||||
#ifdef _WIN32
|
#include <SDL.h>
|
||||||
#include <SDL.h>
|
|
||||||
#else
|
|
||||||
#include <SDL/SDL.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if SDL_VERSION_ATLEAST(1, 3, 0)
|
#if SDL_VERSION_ATLEAST(1, 3, 0)
|
||||||
#define USE_SDL_HAPTIC
|
#define USE_SDL_HAPTIC
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef USE_SDL_HAPTIC
|
#ifdef USE_SDL_HAPTIC
|
||||||
#ifdef _WIN32
|
#include <SDL_haptic.h>
|
||||||
#include <SDL_haptic.h>
|
|
||||||
#else
|
|
||||||
#include <SDL/SDL_haptic.h>
|
|
||||||
#endif
|
|
||||||
#define SDL_INIT_FLAGS SDL_INIT_JOYSTICK | SDL_INIT_HAPTIC
|
#define SDL_INIT_FLAGS SDL_INIT_JOYSTICK | SDL_INIT_HAPTIC
|
||||||
#else
|
#else
|
||||||
#define SDL_INIT_FLAGS SDL_INIT_JOYSTICK
|
#define SDL_INIT_FLAGS SDL_INIT_JOYSTICK
|
||||||
|
Loading…
x
Reference in New Issue
Block a user