1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-22 07:42:37 +00:00

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);