mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-06-26 18:18:47 +02:00
don't show hmd tools for direct mod HMDs
This commit is contained in:
parent
48ff54300b
commit
cd050b2e60
1 changed files with 10 additions and 3 deletions
|
@ -4803,10 +4803,17 @@ void Application::updateDisplayMode() {
|
||||||
|
|
||||||
oldDisplayPlugin = _displayPlugin;
|
oldDisplayPlugin = _displayPlugin;
|
||||||
_displayPlugin = newDisplayPlugin;
|
_displayPlugin = newDisplayPlugin;
|
||||||
|
|
||||||
|
// If the displayPlugin is a screen based HMD, then it will want the HMDTools displayed
|
||||||
|
// Direct Mode HMDs (like windows Oculus) will be isHmd() but will have a screen of -1
|
||||||
|
bool newPluginWantsHMDTools = newDisplayPlugin ?
|
||||||
|
(newDisplayPlugin->isHmd() && (newDisplayPlugin->getHmdScreen() >= 0)) : false;
|
||||||
|
bool oldPluginWantedHMDTools = oldDisplayPlugin ?
|
||||||
|
(oldDisplayPlugin->isHmd() && (oldDisplayPlugin->getHmdScreen() >= 0)) : false;
|
||||||
|
|
||||||
// Only show the hmd tools after the correct plugin has
|
// Only show the hmd tools after the correct plugin has
|
||||||
// been activated so that it's UI is setup correctly
|
// been activated so that it's UI is setup correctly
|
||||||
if (newDisplayPlugin->isHmd()) {
|
if (newPluginWantsHMDTools) {
|
||||||
showDisplayPluginsTools();
|
showDisplayPluginsTools();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4815,7 +4822,7 @@ void Application::updateDisplayMode() {
|
||||||
_offscreenContext->makeCurrent();
|
_offscreenContext->makeCurrent();
|
||||||
|
|
||||||
// if the old plugin was HMD and the new plugin is not HMD, then hide our hmdtools
|
// if the old plugin was HMD and the new plugin is not HMD, then hide our hmdtools
|
||||||
if (oldDisplayPlugin->isHmd() && !newDisplayPlugin->isHmd()) {
|
if (oldPluginWantedHMDTools && !newPluginWantsHMDTools) {
|
||||||
DependencyManager::get<DialogsManager>()->hmdTools(false);
|
DependencyManager::get<DialogsManager>()->hmdTools(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue