History

don't show hmd tools for direct mod HMDs

ZappoMan committed 11 years ago

Commit cd050b21 parent 48ff5431 file · +10 −3Browse files

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

Unified · Split

interface/src/Application.cpp+10−3
@@ -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 has4814 // Only show the hmd tools after the correct plugin has
4808 // been activated so that it's UI is setup correctly4815 // 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 hmdtools4824 // 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 }

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