History

Merge branch 'master' of https://github.com/highfidelity/hifi into lobby

Stephen Birarda committed 12 years ago

Commit cb7a6cb2 parents e2536dd b506a9930 files · +813 −113Browse files

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

Unified · Split

interface/src/Application.cpp+18−0
@@ -418,6 +418,8 @@ Application::Application(int& argc, char** argv, QElapsedTimer &startup_time) : · 417 unmodified lines
418418 MIDIManager& midiManagerInstance = MIDIManager::getInstance();
419419 midiManagerInstance.openDefaultPort();
420420 #endif
421+
422+ this->installEventFilter(this);
421423 }
422424
423425 Application::~Application() {
@@ -844,6 +846,19 @@ bool Application::event(QEvent* event) { · 420 unmodified lines
844846 return QApplication::event(event);
845847 }
846848
849+bool Application::eventFilter(QObject* object, QEvent* event) {
850+
851+ if (event->type() == QEvent::ShortcutOverride) {
852+ // Filter out captured keys before they're used for shortcut actions.
853+ if (_controllerScriptingInterface.isKeyCaptured(static_cast<QKeyEvent*>(event))) {
854+ event->accept();
855+ return true;
856+ }
857+ }
858+
859+ return false;
860+}
861+
847862 void Application::keyPressEvent(QKeyEvent* event) {
848863
849864 _keysPressed.insert(event->key());
@@ -1539,9 +1554,12 @@ void Application::setEnableVRMode(bool enableVRMode) { · 689 unmodified lines
15391554 OculusManager::disconnect();
15401555 OculusManager::connect();
15411556 }
1557+ int oculusMaxFPS = Menu::getInstance()->getOculusUIMaxFPS();
1558+ setRenderTargetFramerate(oculusMaxFPS);
15421559 OculusManager::recalibrate();
15431560 } else {
15441561 OculusManager::abandonCalibration();
1562+ setRenderTargetFramerate(0);
15451563 }
15461564
15471565 resizeGL(_glWidget->getDeviceWidth(), _glWidget->getDeviceHeight());

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