History

Merge branch 'master' of git://github.com/worklist/hifi into 19373

atlante45 committed 13 years ago

Commit 5d4d0ba2 parents 4dda71e e9f8e5011 files · +606 −205Browse files

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

Unified · Split

interface/src/Application.cpp+15−12
@@ -955,14 +955,17 @@ void Application::idle() { · 954 unmodified lines
955955 // Only run simulation code if more than IDLE_SIMULATE_MSECS have passed since last time we ran
956956
957957 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.
961958
962− // NOTE - this is commented out for now - causing event processing issues reported by Philip and Ryan
963− // birarda - July 3rd
964−
965− // processEvents();
959+ // If we're using multi-touch look, immediately process any
960+ // touch events, and no other events.
961+ // This is necessary because id the idle() call takes longer than the
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+ }
966969
967970 update(1.0f / _fps);
968971
@@ -1930,11 +1933,11 @@ void Application::update(float deltaTime) { · 961 unmodified lines
19301933
19311934 void Application::updateAvatar(float deltaTime) {
19321935
1933− // Update my avatar's head position from gyros and/or webcam
1934− _myAvatar.updateHeadFromGyrosAndOrWebcam(_gyroLook->isChecked(),
1935− glm::vec3(_headCameraPitchYawScale,
1936− _headCameraPitchYawScale,
1937− _headCameraPitchYawScale));
1936+ // Update my avatar's state from gyros and/or webcam
1937+ _myAvatar.updateFromGyrosAndOrWebcam(_gyroLook->isChecked(),
1938+ glm::vec3(_headCameraPitchYawScale,
1939+ _headCameraPitchYawScale,
1940+ _headCameraPitchYawScale));
19381941
19391942 if (_serialHeadSensor.isActive()) {
19401943

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