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
1756#endif1756#endif
1757 });1757 });
1758 1758
1759
1759 // Setup the _keyboardMouseDevice, _touchscreenDevice, _touchscreenVirtualPadDevice and the user input mapper with the default bindings1760 // Setup the _keyboardMouseDevice, _touchscreenDevice, _touchscreenVirtualPadDevice and the user input mapper with the default bindings
1760 userInputMapper->registerDevice(_keyboardMouseDevice->getInputDevice());1761 userInputMapper->registerDevice(_keyboardMouseDevice->getInputDevice());
1761 // if the _touchscreenDevice is not supported it will not be registered1762 // if the _touchscreenDevice is not supported it will not be registered
@@ -9162,12 +9163,15 @@ void Application::enterForeground() { · 7400 unmodified lines
9162 auto nodeList = DependencyManager::get<NodeList>();9163 auto nodeList = DependencyManager::get<NodeList>();
9163 nodeList->setSendDomainServerCheckInEnabled(true);9164 nodeList->setSendDomainServerCheckInEnabled(true);
9164}9165}
9165#endif9166
9166 9167
9167void Application::toggleAwayMode(){9168void Application::toggleAwayMode(){
9168 auto key = QKeyEvent(QEvent::KeyPress,Qt::Key_Escape,Qt::NoModifier);9169 QKeyEvent event = QKeyEvent (QEvent::KeyPress, Qt::Key_Escape, Qt::NoModifier);
9169 _keyboardMouseDevice->keyPressEvent(&key);9170 QCoreApplication::sendEvent (this, &event);
9170 qDebug()<<"QQQ_ AWAY MODE ";
9171}9171}
9172 9172
9173
9174#endif
9175
9176
9173#include "Application.moc"9177#include "Application.moc"