mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-10 13:33:31 +02:00
Merge pull request #623 from machinelevel/dev4
Added safety checks to processEvents(), which was causing problems. Also...
This commit is contained in:
commit
e9f8e50d49
1 changed files with 10 additions and 7 deletions
|
@ -955,14 +955,17 @@ 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.
|
|
||||||
|
|
||||||
// NOTE - this is commented out for now - causing event processing issues reported by Philip and Ryan
|
// If we're using multi-touch look, immediately process any
|
||||||
// birarda - July 3rd
|
// touch events, and no other events.
|
||||||
|
// This is necessary because id the idle() call takes longer than the
|
||||||
// processEvents();
|
// interval between idle() calls, the event loop never gets to run,
|
||||||
|
// and touch events get delayed.
|
||||||
|
if (_touchLook->isChecked()) {
|
||||||
|
sendPostedEvents(NULL, QEvent::TouchBegin);
|
||||||
|
sendPostedEvents(NULL, QEvent::TouchUpdate);
|
||||||
|
sendPostedEvents(NULL, QEvent::TouchEnd);
|
||||||
|
}
|
||||||
|
|
||||||
update(1.0f / _fps);
|
update(1.0f / _fps);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue