NvGamepadAndroid Class ReferenceClass representing the Android implementation of gamepads. More...
Public Member Functions
|virtual bool||pollGamepads (AInputEvent *event, uint32_t &changedMask)|
|Passes Android input events to the gamepad system for processing. |
|virtual bool||getState (int32_t padID, State &state)|
|Get the state of a gamepad. |
|virtual void||setMaxGamepadCount (int32_t max)|
|Sets the maximum number of simultaneous gamepads. |
|virtual int32_t||getMaxGamepadCount ()|
|Gets the maximum number of simultaneous gamepads. |
Static Protected Member Functions
|static void||ProcessDPAD (AInputEvent *event, State &state)|
Detailed DescriptionClass representing the Android implementation of gamepads.
Class implementing gamepad support for the Android platform. This is mainly a "producer" class, used by an app framework or main loop implementation to provide Android-specific events, so that an application can access it as the NvGamepad base class and read the gamepads. As a result, the only new function exposed by this subclass is pollGamepads, which passes Android input events to the implementation for updating the gamepad state.
Member Function Documentation
|virtual int32_t NvGamepadAndroid::getMaxGamepadCount||(||)||
|virtual bool NvGamepadAndroid::getState||(||int32_t||padID,|
Get the state of a gamepad.
Queries the state of the desired gamepad, copying it into an application-supplied status structure
[in] padID the index of the pad to read [0, MAX_GAMEPADS) [out] state the current state of the queried gamepad
- True on success, false if no pad connected at padID
- See also:
|virtual bool NvGamepadAndroid::pollGamepads||(||AInputEvent *||event,|
Passes Android input events to the gamepad system for processing.
Used by the app framework or main loop to pass all Android input events to the gamepad system for processing. Updates the internal representation of the state of all attached gamepads
[in] event the Android input event to be processed by the gamepad system. The caller need not and should not pre-process these events; all filtering will be done by the function and irrelevant events ignored [in,out] changedMask a mask of the changed gamepads. Bits 0-(MAX_GAMEPADS-1) will be 1 if the gamepad of that index (1<<index) has changed. Note that an existing nonzero mask may be sent - this function will either leave the mask unchanged or will add set bits for any newly-changed pads
- true if gamepad support "ate" the event, and should not be processed any further by the app's framework
|virtual void NvGamepadAndroid::setMaxGamepadCount||(||int32_t||max||)||
Sets the maximum number of simultaneous gamepads.
Sets the maximum number of gamepads that the system should track For apps that will not support more than a fixed count of controllers, this could lower the expense of the library. This is purely a hint
[in] sets the maximum number of expected gamepads [1, MAX_GAMEPADS]
The documentation for this class was generated from the following file: