summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndré Nusser <andre.nusser@googlemail.com>2018-08-04 18:39:31 +0200
committerAndré Nusser <andre.nusser@googlemail.com>2018-08-04 18:39:31 +0200
commitea743668192e0921ab46d5e863df5b754ce82656 (patch)
tree34948df16cfcc5ef61cbe1cf1d973aa6abae18bb
parent84730760698833df09eb8b082a5473be5fc85c85 (diff)
Add output when drumgizmo is called without arguments.
This intends to tell people who want to use the GUI that this is the wrong place to search.
-rw-r--r--drumgizmo/drumgizmoc.cc13
1 files changed, 13 insertions, 0 deletions
diff --git a/drumgizmo/drumgizmoc.cc b/drumgizmo/drumgizmoc.cc
index 573b463..0c3e190 100644
--- a/drumgizmo/drumgizmoc.cc
+++ b/drumgizmo/drumgizmoc.cc
@@ -75,6 +75,11 @@ static std::string usage(std::string name)
{
std::ostringstream output;
output <<
+ "==============================================================================\n"
+ "This is the command line version of DrumGizmo. The graphical user interface is\n"
+ "only available in the plugins.\n"
+ "==============================================================================\n"
+ "\n"
"Usage: " << name << " [options] drumkitfile\n"
"Options:\n"
" -a, --async-load Load drumkit in the background and start the"
@@ -218,6 +223,14 @@ int main(int argc, char* argv[])
hugin_flags = HUG_FLAG_DEFAULT;
#endif /*DISABLE_HUGIN*/
+ // if no arguments are passed, just print usage and exit
+ if (argc == 1)
+ {
+ std::cout << version();
+ std::cout << usage(argv[0]);
+ exit(0);
+ }
+
opt.add("async-load", no_argument, 'a', [&]() {
async = true;
});