diff options
author | Michael Wright <michaelwr@google.com> | 2013-07-17 13:23:26 -0700 |
---|---|---|
committer | Michael Wright <michaelwr@google.com> | 2013-07-22 16:37:28 -0700 |
commit | 0415d63b1adf15f6546fea902c66f8bd508afbfc (patch) | |
tree | 3349ffdb7be9514bf645ab3bfd6b1d65c3138cd9 /libs/input | |
parent | 7ffaa7c60d51cc0eb731158de2ac3df9c50cc0b4 (diff) | |
download | frameworks_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 'libs/input')
-rw-r--r-- | libs/input/InputDevice.cpp | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/libs/input/InputDevice.cpp b/libs/input/InputDevice.cpp index 54703d4..b11110a 100644 --- a/libs/input/InputDevice.cpp +++ b/libs/input/InputDevice.cpp @@ -127,26 +127,25 @@ String8 getInputDeviceConfigurationFilePathByName( // --- InputDeviceInfo --- InputDeviceInfo::InputDeviceInfo() { - initialize(-1, -1, InputDeviceIdentifier(), String8(), false); + initialize(-1, 0, -1, InputDeviceIdentifier(), String8(), false); } InputDeviceInfo::InputDeviceInfo(const InputDeviceInfo& other) : - mId(other.mId), mGeneration(other.mGeneration), mIdentifier(other.mIdentifier), - mAlias(other.mAlias), mIsExternal(other.mIsExternal), mSources(other.mSources), - mKeyboardType(other.mKeyboardType), - mKeyCharacterMap(other.mKeyCharacterMap), - mHasVibrator(other.mHasVibrator), - mHasButtonUnderPad(other.mHasButtonUnderPad), - mMotionRanges(other.mMotionRanges) { + mId(other.mId), mGeneration(other.mGeneration), mControllerNumber(other.mControllerNumber), + mIdentifier(other.mIdentifier), mAlias(other.mAlias), mIsExternal(other.mIsExternal), + mSources(other.mSources), mKeyboardType(other.mKeyboardType), + mKeyCharacterMap(other.mKeyCharacterMap), mHasVibrator(other.mHasVibrator), + mHasButtonUnderPad(other.mHasButtonUnderPad), mMotionRanges(other.mMotionRanges) { } InputDeviceInfo::~InputDeviceInfo() { } -void InputDeviceInfo::initialize(int32_t id, int32_t generation, +void InputDeviceInfo::initialize(int32_t id, int32_t generation, int32_t controllerNumber, const InputDeviceIdentifier& identifier, const String8& alias, bool isExternal) { mId = id; mGeneration = generation; + mControllerNumber = controllerNumber; mIdentifier = identifier; mAlias = alias; mIsExternal = isExternal; |