|
| GameController (SDL_GameController *controller, int deviceIndex, AntiMicroSettings *settings, int counterUniques, QObject *parent) |
|
virtual QString | getName () override |
|
virtual QString | getSDLName () override |
|
virtual QString | getXmlName () const override |
|
virtual QString | getGUIDString () const override |
|
virtual QString | getVendorString () const override |
|
virtual QString | getProductIDString () const override |
|
virtual QString | getSerialString () const override |
|
virtual QString | getUniqueIDString () const override |
|
virtual QString | getRawGUIDString () const override |
|
virtual QString | getProductVersion () const override |
|
virtual QString | getRawUniqueIDString () const override |
|
virtual QString | getRawVendorString () const override |
|
virtual QString | getRawProductIDString () const override |
|
virtual QString | getRawProductVersion () const override |
|
virtual bool | isGameController () override |
| Check if device is using the SDL Game Controller API. More...
|
|
virtual void | closeSDLDevice () override |
|
virtual SDL_JoystickID | getSDLJoystickID () override |
|
virtual int | getNumberRawButtons () override |
|
virtual int | getNumberRawAxes () override |
|
virtual int | getNumberRawHats () override |
|
virtual double | getRawSensorRate (JoySensorType type) override |
| Queries the data rate of the given sensor from SDL. More...
|
|
virtual bool | hasRawSensor (JoySensorType type) override |
| Queries if the hardware has the given sensor type. More...
|
|
void | setCounterUniques (int counter) override |
|
QString | getBindStringForAxis (int index, bool trueIndex=true) |
|
QString | getBindStringForButton (int index, bool trueIndex=true) |
|
SDL_GameControllerButtonBind | getBindForAxis (int index) |
|
SDL_GameControllerButtonBind | getBindForButton (int index) |
|
bool | isRelevantUniqueID (QString tempUniqueID) |
| Check if GUID passed matches the expected GUID for a device. Needed for xinput GUID abstraction. More...
|
|
void | rawButtonEvent (int index, bool pressed) |
|
void | rawAxisEvent (int index, int value) |
|
void | rawDPadEvent (int index, int value) |
|
const QHash< int, bool > & | getRawbuttons () |
|
const QHash< int, int > & | getAxisvalues () |
|
const QHash< int, int > & | getDpadvalues () |
|
SDL_GameController * | getController () const |
|
virtual SDL_GameControllerType | getControllerType () const override |
| Returns the current controller model. More...
|
|
| InputDevice (SDL_Joystick *joystick, int deviceIndex, AntiMicroSettings *settings, QObject *parent) |
|
virtual | ~InputDevice () |
|
virtual int | getNumberButtons () |
|
virtual int | getNumberAxes () |
|
virtual int | getNumberHats () |
|
virtual int | getNumberSticks () |
|
virtual bool | hasSensor (JoySensorType type) |
| Checks if this input device has a sensor of given type. More...
|
|
virtual int | getNumberVDPads () |
|
int | getJoyNumber () |
|
int | getRealJoyNumber () |
|
int | getActiveSetNumber () |
|
SetJoystick * | getActiveSetJoystick () |
|
SetJoystick * | getSetJoystick (int index) |
|
void | removeControlStick (int index) |
|
bool | isActive () |
|
int | getButtonDownCount () |
|
virtual QString | getDescription () |
|
virtual QString | getStringIdentifier () |
|
QString | getSDLPlatform () |
|
virtual bool | isKnownController () |
|
void | setButtonName (int index, QString tempName) |
|
void | setAxisButtonName (int axisIndex, int buttonIndex, QString tempName) |
|
void | setStickButtonName (int stickIndex, int buttonIndex, QString tempName) |
|
void | setSensorButtonName (JoySensorType type, JoySensorDirection direction, QString tempName) |
| Sets the name of a mapped sensor button in all sets Used during XML loading. More...
|
|
void | setDPadButtonName (int dpadIndex, int buttonIndex, QString tempName) |
|
void | setVDPadButtonName (int vdpadIndex, int buttonIndex, QString tempName) |
|
void | setAxisName (int axisIndex, QString tempName) |
|
void | setStickName (int stickIndex, QString tempName) |
|
void | setSensorName (JoySensorType type, QString tempName) |
| Sets the name of a sensor in all sets Used during XML loading. More...
|
|
void | setDPadName (int dpadIndex, QString tempName) |
|
void | setVDPadName (int vdpadIndex, QString tempName) |
|
int | getDeviceKeyPressTime () |
|
void | setIndex (int index) |
|
bool | isDeviceEdited () |
|
void | revertProfileEdited () |
|
void | setKeyRepeatStatus (bool enabled) |
|
void | setKeyRepeatDelay (int delay) |
|
void | setKeyRepeatRate (int rate) |
|
bool | isKeyRepeatEnabled () |
|
int | getKeyRepeatDelay () |
|
int | getKeyRepeatRate () |
|
QString | getProfileName () |
|
bool | hasCalibrationThrottle (int axisNum) |
|
JoyAxis::ThrottleTypes | getCalibrationThrottle (int axisNum) |
|
void | setCalibrationThrottle (int axisNum, JoyAxis::ThrottleTypes throttle) |
|
void | setCalibrationStatus (int axisNum, JoyAxis::ThrottleTypes throttle) |
|
void | removeCalibrationStatus (int axisNum) |
|
void | sendLoadProfileRequest (QString location) |
|
AntiMicroSettings * | getSettings () |
|
void | activatePossiblePendingEvents () |
|
void | activatePossibleControlStickEvents () |
|
void | activatePossibleAxisEvents () |
|
void | activatePossibleSensorEvents () |
|
void | activatePossibleDPadEvents () |
|
void | activatePossibleVDPadEvents () |
|
void | activatePossibleButtonEvents () |
|
void | convertToUniqueMappSett (QSettings *sett, QString gUIDmappGroupSett, QString uniqueIDGroupSett) |
|
bool | isEmptyUniqueID (QString tempUniqueID) |
| Check if the GUID passed is considered empty. More...
|
|
bool | isRelevantUniqueID (QString tempUniqueID) |
| Check if GUID passed matches the expected GUID for a device. Needed for xinput GUID abstraction. More...
|
|
void | setRawAxisDeadZone (int deadZone) |
|
int | getRawAxisDeadZone () |
|
void | rawAxisEvent (int index, int value) |
|
bool | elementsHaveNames () |
|
QMap< int, SetJoystick * > & | getJoystick_sets () |
|
SDL_Joystick * | getJoyHandle () const |
|
InputDeviceCalibration * | getCalibrationBackend () |
| Returns a pointer to the internal calibration storage backend. More...
|
|
void | updateStickCalibration (int index, double offsetX, double gainX, double offsetY, double gainY) |
| Updates stored calibration for this controller and applies calibration to the specified stick in all sets See JoyControlStick::setCalibration. More...
|
|
void | applyStickCalibration (int index, double offsetX, double gainX, double offsetY, double gainY) |
| Applies calibration to the specified stick in all sets See JoyControlStick::setCalibration. More...
|
|
void | updateAccelerometerCalibration (double offsetX, double offsetY, double offsetZ) |
| Applies calibration to the specified accelerometer in all sets See JoySensor::setCalibration. More...
|
|
void | applyAccelerometerCalibration (double offsetX, double offsetY, double offsetZ) |
| Applies calibration to the specified accelerometer in all sets See JoySensor::setCalibration. More...
|
|
void | updateGyroscopeCalibration (double offsetX, double offsetY, double offsetZ) |
| Updates stored calibration for this controller and applies calibration to the specified gyroscope in all sets See JoySensor::setCalibration. More...
|
|
void | applyGyroscopeCalibration (double offsetX, double offsetY, double offsetZ) |
| Applies calibration to the specified gyroscope in all sets See JoySensor::setCalibration. More...
|
|
|
virtual void | axisActivatedEvent (int setindex, int axisindex, int value) override |
|
virtual void | buttonClickEvent (int buttonindex) override |
|
virtual void | buttonReleaseEvent (int buttonindex) override |
|
void | propogateSetChange (int index) |
|
void | propogateSetAxisThrottleChange (int index, int originset) |
|
void | buttonDownEvent (int setindex, int buttonindex) |
|
void | buttonUpEvent (int setindex, int buttonindex) |
|
virtual void | axisActivatedEvent (int setindex, int axisindex, int value) |
|
virtual void | axisReleasedEvent (int setindex, int axisindex, int value) |
|
virtual void | axisButtonDownEvent (int setindex, int axisindex, int buttonindex) |
|
virtual void | axisButtonUpEvent (int setindex, int axisindex, int buttonindex) |
|
virtual void | dpadButtonDownEvent (int setindex, int dpadindex, int buttonindex) |
|
virtual void | dpadButtonUpEvent (int setindex, int dpadindex, int buttonindex) |
|
virtual void | stickButtonDownEvent (int setindex, int stickindex, int buttonindex) |
|
virtual void | stickButtonUpEvent (int setindex, int stickindex, int buttonindex) |
|
virtual void | sensorButtonDownEvent (int setindex, JoySensorType type, JoySensorDirection direction) |
|
virtual void | sensorButtonUpEvent (int setindex, JoySensorType type, JoySensorDirection direction) |
|
void | updateSetButtonNames (int index) |
|
void | updateSetAxisButtonNames (int axisIndex, int buttonIndex) |
|
void | updateSetStickButtonNames (int stickIndex, int buttonIndex) |
|
void | updateSetSensorButtonNames (JoySensorType type, JoySensorDirection direction) |
| Rename mapped sensor button in all sets to the name in the active set. More...
|
|
void | updateSetDPadButtonNames (int dpadIndex, int buttonIndex) |
|
void | updateSetVDPadButtonNames (int vdpadIndex, int buttonIndex) |
|
void | updateSetAxisNames (int axisIndex) |
|
void | updateSetStickNames (int stickIndex) |
|
void | updateSetSensorNames (JoySensorType type) |
| Rename sensor in all sets to the name in the current set. More...
|
|
void | updateSetDPadNames (int dpadIndex) |
|
void | updateSetVDPadNames (int vdpadIndex) |
|
|
void | reset () |
|
void | transferReset () |
| Obtain current joystick element values, create new SetJoystick objects, and then transfer most recent joystick element values to new current set. More...
|
|
void | reInitButtons () |
|
void | resetButtonDownCount () |
|
void | setActiveSetNumber (int index) |
|
void | changeSetButtonAssociation (int button_index, int originset, int newset, int mode) |
|
void | changeSetAxisButtonAssociation (int button_index, int axis_index, int originset, int newset, int mode) |
|
void | changeSetStickButtonAssociation (int button_index, int stick_index, int originset, int newset, int mode) |
|
void | changeSetSensorButtonAssociation (JoySensorDirection direction, JoySensorType type, int originset, int newset, int mode) |
| Creates reverse set change button mapping for toggle and while-hold set change mappings. More...
|
|
void | changeSetDPadButtonAssociation (int button_index, int dpad_index, int originset, int newset, int mode) |
|
void | changeSetVDPadButtonAssociation (int button_index, int dpad_index, int originset, int newset, int mode) |
|
void | setDeviceKeyPressTime (int newPressTime) |
|
void | profileEdited () |
|
void | setProfileName (QString value) |
|
void | haltServices () |
|
void | finalRemoval () |
|
virtual void | buttonClickEvent (int buttonindex) |
|
virtual void | buttonReleaseEvent (int buttonindex) |
|
virtual void | dpadButtonClickEvent (int buttonindex) |
|
virtual void | dpadButtonReleaseEvent (int buttonindex) |
|
void | establishPropertyUpdatedConnection () |
|
void | disconnectPropertyUpdatedConnection () |
|
void | setChangeActivated (int index) |
|
void | setAxisThrottleActivated (int index) |
|
void | clicked (int index) |
|
void | released (int index) |
|
void | rawButtonClick (int index) |
|
void | rawButtonRelease (int index) |
|
void | rawAxisButtonClick (int axis, int buttonindex) |
|
void | rawAxisButtonRelease (int axis, int buttonindex) |
|
void | rawDPadButtonClick (int dpad, int buttonindex) |
|
void | rawDPadButtonRelease (int dpad, int buttonindex) |
|
void | rawAxisActivated (int axis, int value) |
|
void | rawAxisReleased (int axis, int value) |
|
void | rawAxisMoved (int axis, int value) |
|
void | profileUpdated () |
|
void | propertyUpdated () |
|
void | profileNameEdited (QString text) |
|
void | requestProfileLoad (QString location) |
|
void | requestWait () |
|
void | enableSetConnections (SetJoystick *setstick) |
| Establishes necessary connections for set change slots. More...
|
|
QHash< int, JoyAxis::ThrottleTypes > & | getCali () |
|
SDL_JoystickID * | getJoystickID () |
|
int | rawAxisDeadZone |
|
int | keyPressTime |
|
QString | profileName |
|
InputDeviceCalibration | m_calibrations |
|
Represents a typical gamepad (like PS4 or Xbox gamepad)
It represents typical gamepads with two analog sticks, one dpad, two shoulder buttons on each side (one of them possibly a trigger axis and not just a button), 4 buttons on the right and some buttons in the middle of the pad.
SDL2 maps the axis and buttons of devices it knows (and XInput Devices on Windows) to standardized button/axis names based on xbox360/xinput controllers. It often uses SDL bindings to figure out how gamepad should look like. Every device in this category releases events SDL_CONTROLLER... (like SDL_CONTROLLERBUTTONUP)
Each SDL Gamecontroller device can also be used as a bit more general-purposed Joystick device.
- See also
- https://wiki.libsdl.org/CategoryGameController
-
https://wiki.libsdl.org/SDL_IsGameController