mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 11:28:03 +02:00
Merge pull request #618 from machinelevel/dev4
Fixed two-finger touch delay, and all other hidden event-pile-up.
This commit is contained in:
commit
fc3ce26c70
2 changed files with 9 additions and 0 deletions
|
@ -946,6 +946,11 @@ void Application::idle() {
|
||||||
// Only run simulation code if more than IDLE_SIMULATE_MSECS have passed since last time we ran
|
// Only run simulation code if more than IDLE_SIMULATE_MSECS have passed since last time we ran
|
||||||
|
|
||||||
if (diffclock(&_lastTimeIdle, &check) > IDLE_SIMULATE_MSECS) {
|
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);
|
update(1.0f / _fps);
|
||||||
|
|
||||||
_glWidget->updateGL();
|
_glWidget->updateGL();
|
||||||
|
|
|
@ -17,6 +17,10 @@ HifiLeapListener* LeapManager::_listener = NULL;
|
||||||
|
|
||||||
class HifiLeapListener : public Leap::Listener {
|
class HifiLeapListener : public Leap::Listener {
|
||||||
public:
|
public:
|
||||||
|
HifiLeapListener() {
|
||||||
|
}
|
||||||
|
virtual ~HifiLeapListener() {
|
||||||
|
}
|
||||||
Leap::Frame lastFrame;
|
Leap::Frame lastFrame;
|
||||||
std::vector<glm::vec3> fingerTips;
|
std::vector<glm::vec3> fingerTips;
|
||||||
std::vector<glm::vec3> fingerRoots;
|
std::vector<glm::vec3> fingerRoots;
|
||||||
|
|
Loading…
Reference in a new issue