 |
AntiMicroX
|
Go to the documentation of this file.
19 #ifndef GAMECONTROLLER_H
20 #define GAMECONTROLLER_H
22 #include <SDL2/SDL_gamecontroller.h>
25 class QXmlStreamReader;
26 class QXmlStreamWriter;
52 virtual QString
getName()
override;
117 #endif // GAMECONTROLLER_H
virtual void buttonClickEvent(int buttonindex) override
Definition: gamecontroller.cpp:288
virtual void axisActivatedEvent(int setindex, int axisindex, int value) override
Definition: gamecontroller.cpp:307
SDL_JoystickID joystickID
Definition: gamecontroller.h:110
int counterUniques
Definition: gamecontroller.h:108
SDL_GameController * controller
Definition: gamecontroller.h:111
virtual bool hasRawSensor(JoySensorType type) override
Queries if the hardware has the given sensor type.
Definition: gamecontroller.cpp:217
QHash< int, int > dpadvalues
Definition: gamecontroller.h:107
QHash< int, int > axisvalues
Definition: gamecontroller.h:106
virtual int getNumberRawButtons() override
Definition: gamecontroller.cpp:186
virtual QString getRawProductIDString() const override
Definition: gamecontroller.cpp:140
#define INFO()
Definition: logger.h:43
void rawDPadEvent(int index, int value)
Definition: gamecontroller.cpp:362
bool isRelevantUniqueID(QString tempUniqueID)
Check if GUID passed matches the expected GUID for a device. Needed for xinput GUID abstraction.
Definition: gamecontroller.cpp:328
virtual double getRawSensorRate(JoySensorType type) override
Queries the data rate of the given sensor from SDL.
Definition: gamecontroller.cpp:199
QString getBindStringForButton(int index, bool trueIndex=true)
Definition: gamecontroller.cpp:250
virtual QString getUniqueIDString() const override
Definition: gamecontroller.cpp:100
virtual SDL_JoystickID getSDLJoystickID() override
Definition: gamecontroller.cpp:309
Definition: antimicrosettings.h:26
QHash< int, bool > rawbuttons
Definition: gamecontroller.h:105
JoySensorType
Definition: joysensortype.h:23
virtual QString getGUIDString() const override
Definition: gamecontroller.cpp:81
virtual int getNumberRawHats() override
Definition: gamecontroller.cpp:228
virtual QString getName() override
Definition: gamecontroller.cpp:62
virtual void closeSDLDevice() override
Definition: gamecontroller.cpp:177
virtual QString getProductVersion() const override
Definition: gamecontroller.cpp:102
virtual QString getRawUniqueIDString() const override
Definition: gamecontroller.cpp:172
void rawButtonEvent(int index, bool pressed)
Definition: gamecontroller.cpp:330
const QHash< int, bool > & getRawbuttons()
Definition: gamecontroller.cpp:377
virtual QString getRawGUIDString() const override
Definition: gamecontroller.cpp:104
SDL_GameControllerType m_controller_type
Definition: gamecontroller.h:112
virtual QString getSerialString() const override
Definition: gamecontroller.cpp:87
QString getBindStringForAxis(int index, bool trueIndex=true)
Definition: gamecontroller.cpp:232
SDL_GameController * getController() const
Definition: gamecontroller.cpp:383
Represents a typical gamepad (like PS4 or Xbox gamepad)
Definition: gamecontroller.h:44
void setCounterUniques(int counter) override
Definition: gamecontroller.cpp:230
virtual SDL_GameControllerType getControllerType() const override
Returns the current controller model.
Definition: gamecontroller.cpp:388
static const QString xmlName
Definition: globalvariables.h:155
const QHash< int, int > & getDpadvalues()
Definition: gamecontroller.cpp:381
virtual QString getRawVendorString() const override
Definition: gamecontroller.cpp:124
virtual QString getXmlName() const override
Definition: gamecontroller.cpp:79
virtual QString getRawProductVersion() const override
Definition: gamecontroller.cpp:156
virtual int getNumberRawAxes() override
Definition: gamecontroller.cpp:188
virtual QString getProductIDString() const override
Definition: gamecontroller.cpp:85
#define WARN()
Definition: logger.h:44
virtual bool isGameController() override
Check if device is using the SDL Game Controller API.
Definition: gamecontroller.cpp:315
GameController(SDL_GameController *controller, int deviceIndex, AntiMicroSettings *settings, int counterUniques, QObject *parent)
Definition: gamecontroller.cpp:37
@ GYROSCOPE
Definition: joysensortype.h:26
void rawAxisEvent(int index, int value)
Definition: gamecontroller.cpp:345
virtual QString getVendorString() const override
Definition: gamecontroller.cpp:83
virtual void buttonReleaseEvent(int buttonindex) override
Definition: gamecontroller.cpp:290
it is up to the author donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License If the distribution and or use of the Library is restricted in certain countries either by patents or by copyrighted the original copyright holder who places the Library under this License may add an geographical distribution limitation excluding those so that distribution is permitted only in or among countries not thus excluded In such this License incorporates the limitation as if written in the body of this License The Free Software Foundation may publish revised and or new versions of the Lesser General Public License from time to time Such new versions will be similar in spirit to the present but may differ in detail to address new problems or concerns Each version is given a distinguishing version number If the Library specifies a version number of this License which applies to it and any later you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation If the Library does not specify a license version number
Definition: lgpl-2.1.txt:423
void enableSensors()
Definition: gamecontroller.cpp:292
const QHash< int, int > & getAxisvalues()
Definition: gamecontroller.cpp:379
A SetJoystick specialized for gamepads.
Definition: gamecontrollerset.h:32
SDL_GameControllerButtonBind getBindForButton(int index)
Definition: gamecontroller.cpp:283
virtual QString getSDLName() override
Definition: gamecontroller.cpp:67
@ ACCELEROMETER
Definition: joysensortype.h:25
SDL_GameControllerButtonBind getBindForAxis(int index)
Definition: gamecontroller.cpp:278