minor webcam cross platform fixes

This commit is contained in:
Craig Raw
2025-03-13 16:54:47 +02:00
parent 2c4de99fad
commit 6f6d61fb75
3 changed files with 10 additions and 5 deletions
@@ -170,11 +170,13 @@ public class QRScanDialog extends Dialog<QRScanDialog.Result> {
webcamResolutionProperty.addListener((_, oldResolution, newResolution) -> {
if(newResolution != null) {
if(newResolution.isStandardAspect() && oldResolution.isWidescreenAspect()) {
setWidth(getWidth());
setHeight(getHeight() + 100);
dialogPane.setMaxHeight(dialogPane.getPrefHeight() + 100);
dialogPane.setPrefHeight(dialogPane.getMaxHeight());
dialogPane.setMinHeight(dialogPane.getMaxHeight());
} else if(newResolution.isWidescreenAspect() && oldResolution.isStandardAspect()) {
setWidth(getWidth());
setHeight(getHeight() - 100);
dialogPane.setMaxHeight(dialogPane.getPrefHeight() - 100);
dialogPane.setPrefHeight(dialogPane.getMaxHeight());
@@ -61,7 +61,12 @@ public class WebcamService extends ScheduledService<Image> {
case 1:
case 2:
case 3:
log.error(ptr.getString(0).trim());
String err = ptr.getString(0).trim();
if(err.equals("tjDecompressHeader2 failed: No error")) { //Safe to ignore
log.debug(err);
} else {
log.error(err);
}
break;
case 4:
case 5: