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
48034803
48044804 oldDisplayPlugin = _displayPlugin;
48054805 _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+
48074814 // Only show the hmd tools after the correct plugin has
48084815 // been activated so that it's UI is setup correctly
4809− if (newDisplayPlugin->isHmd()) {
4816+ if (newPluginWantsHMDTools) {
48104817 showDisplayPluginsTools();
48114818 }
48124819
@@ -4815,7 +4822,7 @@ void Application::updateDisplayMode() { · 2 unmodified lines
48154822 _offscreenContext->makeCurrent();
48164823
48174824 // 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) {
48194826 DependencyManager::get<DialogsManager>()->hmdTools(false);
48204827 }
48214828 }

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