History

added esc key event to fire for the away animation when cycling pause/resume. Reverted change on surface destroy that nullified the surface. Forgot to remove that during testin. Removed comment in away.js with syntax error. Setting cpu/gpu levels back to 1/1 after vr mode is released. Noticed that OS stays in same cpu/gpu level after app closes. Hoping this will help reduce battery drain for user

amer cerkic committed 7 years ago

Commit f04fdb21 parent 9097d9c3 files · +13 −6Browse files

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

Unified · Split

interface/src/Application.cpp+8−4
@@ -1756,6 +1756,7 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo · 1755 unmodified lines
17561756 #endif
17571757 });
17581758
1759+
17591760 // Setup the _keyboardMouseDevice, _touchscreenDevice, _touchscreenVirtualPadDevice and the user input mapper with the default bindings
17601761 userInputMapper->registerDevice(_keyboardMouseDevice->getInputDevice());
17611762 // if the _touchscreenDevice is not supported it will not be registered
@@ -9162,12 +9163,15 @@ void Application::enterForeground() { · 7400 unmodified lines
91629163 auto nodeList = DependencyManager::get<NodeList>();
91639164 nodeList->setSendDomainServerCheckInEnabled(true);
91649165 }
9165−#endif
9166+
91669167
91679168 void Application::toggleAwayMode(){
9168− auto key = QKeyEvent(QEvent::KeyPress,Qt::Key_Escape,Qt::NoModifier);
9169− _keyboardMouseDevice->keyPressEvent(&key);
9170− qDebug()<<"QQQ_ AWAY MODE ";
9169+ QKeyEvent event = QKeyEvent (QEvent::KeyPress, Qt::Key_Escape, Qt::NoModifier);
9170+ QCoreApplication::sendEvent (this, &event);
91719171 }
91729172
9173+
9174+#endif
9175+
9176+
91739177 #include "Application.moc"