diff options
| author | Pavel Rojtberg <rojtberg@gmail.com> | 2015-10-10 10:00:49 -0700 |
|---|---|---|
| committer | Mister Oyster <oysterized@gmail.com> | 2017-04-11 10:57:30 +0200 |
| commit | c14410ee1654732382180e425bb1a760fca82aa7 (patch) | |
| tree | 652a89d4358f8a4b40c9e5628337b9e5f3edc7c8 /scripts | |
| parent | 31ed980070a0aa63db257b190c5da13ad0832b5e (diff) | |
Input: xpad - use ida() for finding the pad_nr
The pad_nr corresponds to the lit up LED on the controller. Therefore there
should be no gaps when enumerating. Currently a LED is only re-assigned
after a controller is re-connected 4 times.
This patch uses ida to track connected pads - this way we can re-assign
freed up pad number immediately.
Consider the following case:
1. pad A is connected and gets pad_nr = 0
2. pad B is connected and gets pad_nr = 1
3. pad A is disconnected
4. pad A is connected again
using ida_simple_get() controller A now correctly gets pad_nr = 0 again.
Signed-off-by: Pavel Rojtberg <rojtberg@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Tim Clark <tim.clark.82@gmail.com>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions
