Showing the changes to interface/src/Application.cpp (1 of 1 file). Show all
Unified · Split
| @@ -4803,10 +4803,17 @@ void Application::updateDisplayMode() { · 4802 unmodified lines | |||
| 4803 | 4803 | ||
| 4804 | oldDisplayPlugin = _displayPlugin; | 4804 | oldDisplayPlugin = _displayPlugin; |
| 4805 | _displayPlugin = newDisplayPlugin; | 4805 | _displayPlugin = newDisplayPlugin; |
| 4806 | 4806 | ||
| 4807 | // If the displayPlugin is a screen based HMD, then it will want the HMDTools displayed | ||
| 4808 | // Direct Mode HMDs (like windows Oculus) will be isHmd() but will have a screen of -1 | ||
| 4809 | bool newPluginWantsHMDTools = newDisplayPlugin ? | ||
| 4810 | (newDisplayPlugin->isHmd() && (newDisplayPlugin->getHmdScreen() >= 0)) : false; | ||
| 4811 | bool oldPluginWantedHMDTools = oldDisplayPlugin ? | ||
| 4812 | (oldDisplayPlugin->isHmd() && (oldDisplayPlugin->getHmdScreen() >= 0)) : false; | ||
| 4813 | |||
| 4807 | // Only show the hmd tools after the correct plugin has | 4814 | // Only show the hmd tools after the correct plugin has |
| 4808 | // been activated so that it's UI is setup correctly | 4815 | // been activated so that it's UI is setup correctly |
| 4809 | if (newDisplayPlugin->isHmd()) { | 4816 | if (newPluginWantsHMDTools) { |
| 4810 | showDisplayPluginsTools(); | 4817 | showDisplayPluginsTools(); |
| 4811 | } | 4818 | } |
| 4812 | 4819 | ||
| @@ -4815,7 +4822,7 @@ void Application::updateDisplayMode() { · 2 unmodified lines | |||
| 4815 | _offscreenContext->makeCurrent(); | 4822 | _offscreenContext->makeCurrent(); |
| 4816 | 4823 | ||
| 4817 | // if the old plugin was HMD and the new plugin is not HMD, then hide our hmdtools | 4824 | // if the old plugin was HMD and the new plugin is not HMD, then hide our hmdtools |
| 4818 | if (oldDisplayPlugin->isHmd() && !newDisplayPlugin->isHmd()) { | 4825 | if (oldPluginWantedHMDTools && !newPluginWantsHMDTools) { |
| 4819 | DependencyManager::get<DialogsManager>()->hmdTools(false); | 4826 | DependencyManager::get<DialogsManager>()->hmdTools(false); |
| 4820 | } | 4827 | } |
| 4821 | } | 4828 | } |