From 5d5bfd340bc5ca5e2238d15e25832fe41a00c9f3 Mon Sep 17 00:00:00 2001 From: Gene Payne Date: Fri, 2 Oct 2020 15:49:27 -0600 Subject: [PATCH] Added configuration file bypass launcher key option --- apps/OpenSpace/main.cpp | 2 +- include/openspace/engine/configuration.h | 1 + openspace.cfg | 1 + src/engine/configuration.cpp | 2 ++ 4 files changed, 5 insertions(+), 1 deletion(-) diff --git a/apps/OpenSpace/main.cpp b/apps/OpenSpace/main.cpp index cdc96a6a8d..0a6725a548 100644 --- a/apps/OpenSpace/main.cpp +++ b/apps/OpenSpace/main.cpp @@ -1168,7 +1168,7 @@ int main(int argc, char** argv) { QApplication* qaobj = nullptr; LauncherWindow* launchwin = nullptr; bool skipLauncherSinceProfileAndWindowAreConfiguredInCli = - (haveCliProfile && haveCliSGCTConfig); + (haveCliProfile && haveCliSGCTConfig) || global::configuration.bypassLauncher; if (!skipLauncherSinceProfileAndWindowAreConfiguredInCli) { int qac = 0; diff --git a/include/openspace/engine/configuration.h b/include/openspace/engine/configuration.h index a88e0fc5d4..3962967033 100644 --- a/include/openspace/engine/configuration.h +++ b/include/openspace/engine/configuration.h @@ -94,6 +94,7 @@ struct Configuration { glm::dvec3 masterRotation = glm::dvec3(0.0); bool isConsoleDisabled = false; bool usingProfile = false; + bool bypassLauncher = false; std::map moduleConfigurations; diff --git a/openspace.cfg b/openspace.cfg index 7b1483fc6e..7fa9458c73 100644 --- a/openspace.cfg +++ b/openspace.cfg @@ -244,3 +244,4 @@ OpenGLDebugContext = { -- FilterSeverity = { } } --RenderingMethod = "ABuffer" -- alternative: "Framebuffer" +BypassLauncher = false diff --git a/src/engine/configuration.cpp b/src/engine/configuration.cpp index 20ddb67136..a3491f54be 100644 --- a/src/engine/configuration.cpp +++ b/src/engine/configuration.cpp @@ -92,6 +92,7 @@ namespace { constexpr const char* KeySgctConfigNameInitialized = "sgctconfiginitializeString"; constexpr const char* KeyReadOnlyProfiles = "ProfilesReadOnly"; + constexpr const char* KeyBypassLauncher = "BypassLauncher"; template void getValue(ghoul::lua::LuaState& L, const char* name, T& value) { @@ -310,6 +311,7 @@ void parseLuaState(Configuration& configuration) { getValue(s, KeySgctConfigNameInitialized, c.sgctConfigNameInitialized); getValue(s, KeyReadOnlyProfiles, c.profilesReadOnly); + getValue(s, KeyBypassLauncher, c.bypassLauncher); } std::string findConfiguration(const std::string& filename) {