mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-09-24 23:31:36 +08:00
linux-v4l2: scandir with alphasort on non-Linux
Sort video device entries with `alphasort` on non-Linux platforms, as opposed to `versionsort` on Linux. (`versionsort` is a GNU extension, unavailable on e.g. FreeBSD.) UI: Fix call to `to_string` on FreeBSD
This commit is contained in:
@@ -185,7 +185,14 @@ static bool virtualcam_start(void *data)
|
||||
return false;
|
||||
}
|
||||
|
||||
n = scandir("/dev", &list, scanfilter, versionsort);
|
||||
n = scandir("/dev", &list, scanfilter,
|
||||
#if defined(__linux__)
|
||||
versionsort
|
||||
#else
|
||||
alphasort
|
||||
#endif
|
||||
);
|
||||
|
||||
if (n == -1)
|
||||
return false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user