Merge pull request #618 from machinelevel/dev4

Fixed two-finger touch delay, and all other hidden event-pile-up.
This commit is contained in:
Stephen Birarda 2013-07-03 12:09:46 -07:00
commit fc3ce26c70
2 changed files with 9 additions and 0 deletions

View file

@ -946,6 +946,11 @@ void Application::idle() {
// Only run simulation code if more than IDLE_SIMULATE_MSECS have passed since last time we ran
if (diffclock(&_lastTimeIdle, &check) > IDLE_SIMULATE_MSECS) {
// We call processEvents() here because the idle timer takes priority over
// event handling in Qt, so when the framerate gets low events will pile up
// unless we handle them here.
processEvents();
update(1.0f / _fps);
_glWidget->updateGL();

View file

@ -17,6 +17,10 @@ HifiLeapListener* LeapManager::_listener = NULL;
class HifiLeapListener : public Leap::Listener {
public:
HifiLeapListener() {
}
virtual ~HifiLeapListener() {
}
Leap::Frame lastFrame;
std::vector<glm::vec3> fingerTips;
std::vector<glm::vec3> fingerRoots;