Skip to content

Commit 6feb734

Browse files
committed
vdisp/avf: print warn if no devices were found
1 parent 84f560b commit 6feb734

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/video_capture/avfoundation.mm

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,12 @@ +(NSArray *) devices
267267
}
268268
}
269269

270-
col() << "device marked with an asterisk ('*') is default\n";
270+
if (i == 0 && num_screens == 0) {
271+
MSG(WARNING, "No devices found!\n");
272+
} else {
273+
color_printf("device marked with an asterisk ('*') is default\n");
274+
}
275+
271276
if (!for_screen && verbose == VERB_NORMAL) {
272277
col() << "(type '-t avfoundation:fullhelp' to see available framerates)\n";
273278
col() << "(type '-t avfoundation:shorthelp' to hide modes)\n";

0 commit comments

Comments
 (0)