# HG changeset patch # User Chris Cannam # Date 1553610911 0 # Node ID f6fb577f3809c533b3f5c4730834adb0064399ba # Parent 76b1c50f1f6dfcc0b331674e174c88eaa2aef26f Implement options, add --no-splash diff -r 76b1c50f1f6d -r f6fb577f3809 main/main.cpp --- a/main/main.cpp Mon Mar 25 15:53:03 2019 +0000 +++ b/main/main.cpp Tue Mar 26 14:35:11 2019 +0000 @@ -266,6 +266,8 @@ ("Do not attempt to open an audio output device.") }, { "no-osc", QApplication::tr ("Do not provide an Open Sound Control port for remote control.") }, + { "no-splash", QApplication::tr + ("Do not show a splash screen.") }, { "osc-script", QApplication::tr ("Batch run the OSC script found in the given file. Scripts consist of /command arg1 arg2 ... OSC control lines, optionally interleaved with numbers to specify pauses in seconds."), "osc.txt" } @@ -286,11 +288,12 @@ parser.process(args); + bool audioOutput = !(parser.isSet("no-audio")); + bool oscSupport = !(parser.isSet("no-osc")); + bool showSplash = !(parser.isSet("no-splash")); + args = parser.positionalArguments(); - bool audioOutput = true; - bool oscSupport = true; - QApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); signal(SIGINT, signalHandler); @@ -313,7 +316,7 @@ settings.endGroup(); settings.beginGroup("Preferences"); - if (settings.value("show-splash", true).toBool()) { + if (showSplash && settings.value("show-splash", true).toBool()) { splash = new SVSplash(); splash->show(); QTimer::singleShot(5000, splash, SLOT(hide()));