Showing the changes to interface/src/Application.cpp (1 of 4 files). Show all
Unified · Split
| @@ -535,21 +535,6 @@ Application::Application(int& argc, char** argv, QElapsedTimer &startup_time) : · 534 unmodified lines | ||
| 535 | 535 | container->setFocus(); |
| 536 | 536 | container->installEventFilter(DependencyManager::get<OffscreenUi>().data()); |
| 537 | 537 | |
| 538 | − // Necessary to call this here so Oculus can get inited before Sixense | |
| 539 | − getDisplayPlugins(); | |
| 540 | − | |
| 541 | − // must be before initializeGL() | |
| 542 | − _activeInputPlugins.clear(); | |
| 543 | − auto inputPlugins = getInputPlugins(); | |
| 544 | − foreach(auto inputPlugin, inputPlugins) { | |
| 545 | − QString name = inputPlugin->getName(); | |
| 546 | − if (name == KeyboardMouseDevice::NAME) { | |
| 547 | − _keyboardMouseDevice = static_cast<KeyboardMouseDevice*>(inputPlugin.data()); // TODO: this seems super hacky | |
| 548 | − break; | |
| 549 | − } | |
| 550 | − } | |
| 551 | − updateInputModes(); | |
| 552 | − | |
| 553 | 538 | _offscreenContext->makeCurrent(); |
| 554 | 539 | initializeGL(); |
| 555 | 540 | // initialization continues in initializeGL when OpenGL context is ready |
| @@ -894,6 +879,20 @@ void Application::initializeUi() { · 338 unmodified lines | ||
| 894 | 879 | resizeGL(); |
| 895 | 880 | } |
| 896 | 881 | }); |
| 882 | + | |
| 883 | + // This will prevent the hid_init sixense crash | |
| 884 | + getActiveDisplayPlugin(); | |
| 885 | + | |
| 886 | + // This will set up the input plugins UI | |
| 887 | + _activeInputPlugins.clear(); | |
| 888 | + auto inputPlugins = getInputPlugins(); | |
| 889 | + foreach(auto inputPlugin, inputPlugins) { | |
| 890 | + QString name = inputPlugin->getName(); | |
| 891 | + if (name == KeyboardMouseDevice::NAME) { | |
| 892 | + _keyboardMouseDevice = static_cast<KeyboardMouseDevice*>(inputPlugin.data()); // TODO: this seems super hacky | |
| 893 | + } | |
| 894 | + } | |
| 895 | + updateInputModes(); | |
| 897 | 896 | } |
| 898 | 897 | |
| 899 | 898 | template<typename F> |