Merge pull request #169 from JulianGro/fix-disables

Fix --disable-displays and --disable-inputs arguments
This commit is contained in:
Dale Glass 2022-08-20 21:55:09 +02:00 committed by GitHub
commit cc69f9cb7d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 4 deletions

View file

@ -5,6 +5,7 @@
// Created by Andrzej Kapolka on 5/10/13.
// Copyright 2013 High Fidelity, Inc.
// Copyright 2020 Vircadia contributors.
// Copyright 2022 Overte e.V.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
@ -8793,13 +8794,13 @@ void Application::initPlugins(const QCommandLineParser& parser) {
}
if (parser.isSet("disable-displays")) {
auto disabledDisplays = parser.value("disableDisplays").split(',', Qt::SkipEmptyParts);
auto disabledDisplays = parser.value("disable-displays").split(',', Qt::SkipEmptyParts);
qInfo() << "Disabling following display plugins:" << disabledDisplays;
PluginManager::getInstance()->disableDisplays(disabledDisplays);
}
if (parser.isSet("disable-inputs")) {
auto disabledInputs = parser.value("disableInputs").split(',', Qt::SkipEmptyParts);
auto disabledInputs = parser.value("disable-inputs").split(',', Qt::SkipEmptyParts);
qInfo() << "Disabling following input plugins:" << disabledInputs;
PluginManager::getInstance()->disableInputs(disabledInputs);
}

View file

@ -3,6 +3,7 @@
// interface/src
//
// Copyright 2013 High Fidelity, Inc.
// Copyright 2022 Overte e.V.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
@ -125,12 +126,12 @@ int main(int argc, const char* argv[]) {
);
QCommandLineOption disableDisplaysOption(
"disable-displays",
"Displays to disable.",
"Displays to disable. Valid options include \"OpenVR (Vive)\" and \"Oculus Rift\"",
"string"
);
QCommandLineOption disableInputsOption(
"disable-inputs",
"Inputs to disable.",
"Inputs to disable. Valid options include \"OpenVR (Vive)\" and \"Oculus Rift\"",
"string"
);
QCommandLineOption suppressSettingsResetOption(