Fix Aard pausing/unpausing when not intended

This commit is contained in:
Tamius Han 2024-06-10 23:27:47 +02:00
parent 54d53f1b91
commit 99df043b5f

View File

@ -328,11 +328,13 @@ class Resizer {
// * ar.type is auto, but stretch is set to basic basic stretch
//
// unpause when using other modes
if (ar.type !== AspectRatioType.Automatic || this.stretcher.mode === StretchType.Basic) {
if ((ar.type !== AspectRatioType.Automatic && ar.type !== AspectRatioType.AutomaticUpdate) || this.stretcher.mode === StretchType.Basic) {
this.videoData?.arDetector?.pause();
} else {
if (this.lastAr.type === AspectRatioType.Automatic) {
this.videoData?.arDetector?.unpause();
if (ar.type !== AspectRatioType.AutomaticUpdate) {
if (this.lastAr.type === AspectRatioType.Automatic || this.lastAr.type === AspectRatioType.AutomaticUpdate) {
this.videoData?.arDetector?.unpause();
}
}
}
@ -490,7 +492,6 @@ class Resizer {
}
}
this.videoAlignment = {
x: videoAlignmentX ?? VideoAlignmentType.Default,
y: videoAlignmentY ?? VideoAlignmentType.Default