24 #ifndef INPUT_JOYSTICK_H
25 #define INPUT_JOYSTICK_H
30 PRAGMA48(GCC diagnostic ignored
"-Wshadow")
31 #include <SDL_events.h>
65 {
return joystickCount; }
84 void setNumber(
const int n);
87 { mEnabled = enabled; }
89 static void getNames(STD_VECTOR <std::string> &names);
96 void startCalibration();
98 void finishCalibration();
101 {
return mCalibrating; }
106 {
return mEnabled && ((mDirection &
UP) != 0); }
109 {
return mEnabled && ((mDirection &
DOWN) != 0); }
112 {
return mEnabled && ((mDirection &
LEFT) != 0); }
115 {
return mEnabled && ((mDirection &
RIGHT) != 0); }
121 { mUseInactive = b; }
129 int getButtonFromEvent(
const SDL_Event &event)
const A_WARN_UNUSED;
135 void handleRepeat(const
int time);
137 void resetRepeat(const
int key);
142 unsigned char mDirection;
144 bool mActiveButtons[MAX_BUTTONS];
146 SDL_Joystick *mJoystick;
168 static
bool mEnabled;
169 static
int joystickCount;
171 void doCalibration();
bool isCalibrating() const
static void setEnabled(const bool enabled)
static int getNumberOfJoysticks()
void setUseInactive(const bool b)
#define A_DELETE_COPY(func)
TcpNet::Socket open(IPaddress *const ip)
int close(File *const file)