History

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

Stojce committed 12 years ago

Commit 9be107c2 parents 61c8018 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
@@ -414,6 +414,8 @@ Application::Application(int& argc, char** argv, QElapsedTimer &startup_time) : · 413 unmodified lines
414414 MIDIManager& midiManagerInstance = MIDIManager::getInstance();
415415 midiManagerInstance.openDefaultPort();
416416 #endif
417+
418+ this->installEventFilter(this);
417419 }
418420
419421 Application::~Application() {
@@ -836,6 +838,19 @@ bool Application::event(QEvent* event) { · 416 unmodified lines
836838 return QApplication::event(event);
837839 }
838840
841+bool Application::eventFilter(QObject* object, QEvent* event) {
842+
843+ if (event->type() == QEvent::ShortcutOverride) {
844+ // Filter out captured keys before they're used for shortcut actions.
845+ if (_controllerScriptingInterface.isKeyCaptured(static_cast<QKeyEvent*>(event))) {
846+ event->accept();
847+ return true;
848+ }
849+ }
850+
851+ return false;
852+}
853+
839854 void Application::keyPressEvent(QKeyEvent* event) {
840855
841856 _keysPressed.insert(event->key());
@@ -1494,9 +1509,12 @@ void Application::setEnableVRMode(bool enableVRMode) { · 652 unmodified lines
14941509 OculusManager::disconnect();
14951510 OculusManager::connect();
14961511 }
1512+ int oculusMaxFPS = Menu::getInstance()->getOculusUIMaxFPS();
1513+ setRenderTargetFramerate(oculusMaxFPS);
14971514 OculusManager::recalibrate();
14981515 } else {
14991516 OculusManager::abandonCalibration();
1517+ setRenderTargetFramerate(0);
15001518 }
15011519
15021520 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