Changeset 1710


Ignore:
Timestamp:
Aug 9, 2012, 11:44:59 PM (11 years ago)
Author:
sam
Message:

input: allow to easily track more than one input stick.

Location:
trunk/src/input
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/input/input.cpp

    r1692 r1710  
    218218}
    219219
    220 Stick *Input::TrackStick()
     220Stick *Input::TrackStick(int desired)
    221221{
    222222    /* FIXME: add the possibility to choose amongst sticks */
    223     if (!data->m_sticks.Count())
     223    if (desired >= data->m_sticks.Count())
    224224        return NULL;
    225     Ticker::Ref(data->m_sticks[0]);
    226     return data->m_sticks[0];
     225    Ticker::Ref(data->m_sticks[desired]);
     226    return data->m_sticks[desired];
    227227}
    228228
  • trunk/src/input/input.h

    r1342 r1710  
    5050    static void DestroyStick(Stick *stick);
    5151
    52     static Stick *TrackStick();
     52    static Stick *TrackStick(int desired);
    5353    static void UntrackStick(Stick *stick);
    5454};
Note: See TracChangeset for help on using the changeset viewer.