Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 9, 2009, 8:42:56 PM (15 years ago)
Author:
rgrieder
Message:

Changed an input strategy: When you press a key but don't release it and then clear the input buffer, the release event will not be triggered anymore.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation2/src/libraries/core/input/InputDevice.h

    r5929 r6301  
    203203        {
    204204            // remove the button from the pressedButtons_ list
     205            bool found = false;
    205206            for (unsigned int iButton = 0; iButton < pressedButtons_.size(); iButton++)
    206207            {
     
    208209                {
    209210                    pressedButtons_.erase(pressedButtons_.begin() + iButton);
     211                    found = true;
    210212                    break;
    211213                }
    212214            }
     215            if (!found)
     216                return; // We ignore release strokes when the press was not captured
    213217
    214218            // Call states
Note: See TracChangeset for help on using the changeset viewer.