History

Merge pull request #623 from machinelevel/dev4

Added safety checks to processEvents(), which was causing problems. Also...

Philip Rosedale committed 13 years ago

Commit e9f8e502 parents 4936676 c298f781 file · +10 −7Browse files

Showing the changes to interface/src/Application.cpp (1 of 1 file). Show all

Unified · Split

interface/src/Application.cpp+10−7
@@ -955,14 +955,17 @@ void Application::idle() { · 954 unmodified lines
955 // Only run simulation code if more than IDLE_SIMULATE_MSECS have passed since last time we ran955 // Only run simulation code if more than IDLE_SIMULATE_MSECS have passed since last time we ran
956 956
957 if (diffclock(&_lastTimeIdle, &check) > IDLE_SIMULATE_MSECS) {957 if (diffclock(&_lastTimeIdle, &check) > IDLE_SIMULATE_MSECS) {
958 // We call processEvents() here because the idle timer takes priority over
959 // event handling in Qt, so when the framerate gets low events will pile up
960 // unless we handle them here.
961 958
962 // NOTE - this is commented out for now - causing event processing issues reported by Philip and Ryan959 // If we're using multi-touch look, immediately process any
963 // birarda - July 3rd960 // touch events, and no other events.
964 961 // This is necessary because id the idle() call takes longer than the
965 // processEvents();962 // interval between idle() calls, the event loop never gets to run,
963 // and touch events get delayed.
964 if (_touchLook->isChecked()) {
965 sendPostedEvents(NULL, QEvent::TouchBegin);
966 sendPostedEvents(NULL, QEvent::TouchUpdate);
967 sendPostedEvents(NULL, QEvent::TouchEnd);
968 }
966 969
967 update(1.0f / _fps);970 update(1.0f / _fps);
968 971

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t