fix multipleRatioLimits (#6698)

* fix multipleRatioLimits

* fix building on macOS 11
This commit is contained in:
Cœur 2024-03-16 06:45:31 +08:00 committed by GitHub
parent 6a9727efc7
commit e9d16387ae
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 2 deletions

View File

@ -296,7 +296,7 @@ static CGFloat const kStackViewSpacing = 8.0;
checkRatio = kInvalidValue;
}
if (!multipleRatioLimits && isRatioEqual(ratioLimit, torrent.ratioLimit))
if (!multipleRatioLimits && !isRatioEqual(ratioLimit, torrent.ratioLimit))
{
multipleRatioLimits = YES;
}

View File

@ -2,7 +2,9 @@
// It may be used under the MIT (SPDX: MIT) license.
// License text can be found in the licenses/ folder.
#import <CoreFoundation/CoreFoundation.h>
#import <Foundation/Foundation.h>
// 0.1 precision
bool isSpeedEqual(CGFloat old_speed, CGFloat new_speed);
// 0.01 precision
bool isRatioEqual(CGFloat old_ratio, CGFloat new_ratio);