Skip to content

Commit ee2a9dc

Browse files
Don't output devices for basic CLI usage
1 parent 80a4490 commit ee2a9dc

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

src/main.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,12 +95,12 @@ main(int argc, char** argv)
9595
char message[MISC_LENGTH];
9696
/* int vol; */
9797
bool q = false;
98+
bool ad = true;
9899
int files_index = 1;
99100
int action = ACTION_PLAY;
100101
int active_device = -1;
101102
struct dlist* files = NULL;
102103

103-
104104
while (1)
105105
{
106106
static struct option long_options[] =
@@ -227,10 +227,12 @@ main(int argc, char** argv)
227227
if (action == ACTION_HELP)
228228
{
229229
usage();
230+
ad = false;
230231
}
231232
else if (action == ACTION_VERSION)
232233
{
233234
version();
235+
ad = false;
234236
}
235237
else if (action == ACTION_SAMPLE_CONFIG)
236238
{
@@ -345,7 +347,10 @@ main(int argc, char** argv)
345347
}
346348
else
347349
{
348-
printf("No active devices\n");
350+
if (ad && !config->quiet)
351+
{
352+
printf("No active devices\n");
353+
}
349354
}
350355
}
351356

0 commit comments

Comments
 (0)