summaryrefslogtreecommitdiffstats
path: root/include/input
diff options
context:
space:
mode:
authorMichael Wright <michaelwr@google.com>2013-07-17 13:23:26 -0700
committerMichael Wright <michaelwr@google.com>2013-07-22 16:37:28 -0700
commit0415d63b1adf15f6546fea902c66f8bd508afbfc (patch)
tree3349ffdb7be9514bf645ab3bfd6b1d65c3138cd9 /include/input
parent7ffaa7c60d51cc0eb731158de2ac3df9c50cc0b4 (diff)
downloadframeworks_native-0415d63b1adf15f6546fea902c66f8bd508afbfc.zip
frameworks_native-0415d63b1adf15f6546fea902c66f8bd508afbfc.tar.gz
frameworks_native-0415d63b1adf15f6546fea902c66f8bd508afbfc.tar.bz2
Add controller numbers for gamepads / joysticks
Change-Id: I5294aabbadb836a6a4c7ce76a670abcf50c1f885
Diffstat (limited to 'include/input')
-rw-r--r--include/input/InputDevice.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/input/InputDevice.h b/include/input/InputDevice.h
index d8256c1..1419b45 100644
--- a/include/input/InputDevice.h
+++ b/include/input/InputDevice.h
@@ -67,10 +67,11 @@ public:
float resolution;
};
- void initialize(int32_t id, int32_t generation, const InputDeviceIdentifier& identifier,
- const String8& alias, bool isExternal);
+ void initialize(int32_t id, int32_t generation, int32_t controllerNumber,
+ const InputDeviceIdentifier& identifier, const String8& alias, bool isExternal);
inline int32_t getId() const { return mId; }
+ inline int32_t getControllerNumber() const { return mControllerNumber; }
inline int32_t getGeneration() const { return mGeneration; }
inline const InputDeviceIdentifier& getIdentifier() const { return mIdentifier; }
inline const String8& getAlias() const { return mAlias; }
@@ -111,6 +112,7 @@ public:
private:
int32_t mId;
int32_t mGeneration;
+ int32_t mControllerNumber;
InputDeviceIdentifier mIdentifier;
String8 mAlias;
bool mIsExternal;