mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-15 19:49:47 +02:00
Get logic working correctly.
This commit is contained in:
parent
597f83e6d5
commit
ecee319602
2 changed files with 39 additions and 9 deletions
|
@ -144,7 +144,7 @@
|
|||
handControllerImageURL = "img/tablet-help-oculus.jpg";
|
||||
break;
|
||||
default:
|
||||
handControllerImageURL = null;
|
||||
handControllerImageURL = "";
|
||||
count = 2;
|
||||
}
|
||||
|
||||
|
|
|
@ -3400,21 +3400,51 @@ void Application::showHelp() {
|
|||
static const QString TAB_GAMEPAD = "gamepad";
|
||||
static const QString TAB_HAND_CONTROLLERS = "handControllers";
|
||||
|
||||
QString handControllerName = "";
|
||||
QString handControllerName;
|
||||
QString defaultTab = TAB_KEYBOARD_MOUSE;
|
||||
|
||||
if (PluginUtils::isViveControllerAvailable()) {
|
||||
defaultTab = TAB_HAND_CONTROLLERS;
|
||||
handControllerName = HAND_CONTROLLER_NAME_VIVE;
|
||||
} else if (PluginUtils::isOculusTouchControllerAvailable()) {
|
||||
defaultTab = TAB_HAND_CONTROLLERS;
|
||||
handControllerName = HAND_CONTROLLER_NAME_OCULUS_TOUCH;
|
||||
} else if (qApp->getActiveDisplayPlugin()->getName() == "WindowMS") {
|
||||
qDebug() << "Printing names...";
|
||||
for (auto& inputPlugin : PluginManager::getInstance()->getInputPlugins()) {
|
||||
qDebug() << inputPlugin->getName();
|
||||
auto subdeviceNames = inputPlugin->getSubdeviceNames();
|
||||
for (auto& subdeviceName : subdeviceNames) {
|
||||
qDebug() << " -|" << subdeviceName;
|
||||
}
|
||||
}
|
||||
|
||||
qDebug() << "----------------------";
|
||||
|
||||
auto displayPlugins = PluginManager::getInstance()->getDisplayPlugins();
|
||||
for (auto& displayPlugin : displayPlugins) {
|
||||
qDebug() << displayPlugin->getName();
|
||||
}
|
||||
|
||||
if (PluginUtils::isHMDAvailable("WindowsMR")) {
|
||||
defaultTab = TAB_HAND_CONTROLLERS;
|
||||
handControllerName = HAND_CONTROLLER_NAME_WINDOWS_MR;
|
||||
//} else if (PluginUtils::isViveControllerAvailable()) {
|
||||
} else if (PluginUtils::isHMDAvailable("HTC Vive")) {
|
||||
defaultTab = TAB_HAND_CONTROLLERS;
|
||||
handControllerName = HAND_CONTROLLER_NAME_VIVE;
|
||||
} else if (PluginUtils::isHMDAvailable("Oculus Rift")) {
|
||||
defaultTab = TAB_HAND_CONTROLLERS;
|
||||
handControllerName = HAND_CONTROLLER_NAME_OCULUS_TOUCH;
|
||||
} else if (PluginUtils::isXboxControllerAvailable()) {
|
||||
defaultTab = TAB_GAMEPAD;
|
||||
}
|
||||
//if (QString::compare(qApp->getActiveDisplayPlugin()->getName(), "WindowsMR") == 0) {
|
||||
// defaultTab = TAB_HAND_CONTROLLERS;
|
||||
// handControllerName = HAND_CONTROLLER_NAME_WINDOWS_MR;
|
||||
////} else if (PluginUtils::isViveControllerAvailable()) {
|
||||
//} else if (QString::compare(qApp->getActiveDisplayPlugin()->getName(), "HTC Vive") == 0) {
|
||||
// defaultTab = TAB_HAND_CONTROLLERS;
|
||||
// handControllerName = HAND_CONTROLLER_NAME_VIVE;
|
||||
//} else if (PluginUtils::isOculusTouchControllerAvailable()) {
|
||||
// defaultTab = TAB_HAND_CONTROLLERS;
|
||||
// handControllerName = HAND_CONTROLLER_NAME_OCULUS_TOUCH;
|
||||
//} else if (PluginUtils::isXboxControllerAvailable()) {
|
||||
// defaultTab = TAB_GAMEPAD;
|
||||
//}
|
||||
// TODO need some way to detect windowsMR to load controls reference default tab in Help > Controls Reference menu.
|
||||
|
||||
QUrlQuery queryString;
|
||||
|
|
Loading…
Reference in a new issue