Don't crash NativeDriver on other OSs but log an error

This commit is contained in:
Eduardo Ramos 2022-12-14 21:15:41 +01:00
parent bdfdf2453b
commit 1563f8a3b4
1 changed files with 6 additions and 1 deletions

View File

@ -26,11 +26,16 @@ public class NativeDriver implements WebcamDriver {
} else {
// TODO support at least Linux and Raspberry
LOG.warn("Unsupported OS {}. No devices will be returned!", os);
this.driver = new NativeDriver() {
this.driver = new WebcamDriver() {
@Override
public List<WebcamDevice> getDevices() {
return Collections.emptyList();
}
@Override
public boolean isThreadSafe() {
return true;
}
};
}
}