Skip to content
  • Pavel Rojtberg's avatar
    Input: xpad - use ida() for finding the pad_nr · e3b65174
    Pavel Rojtberg authored
    
    
    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: default avatarPavel Rojtberg <rojtberg@gmail.com>
    Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
    e3b65174