Ignore:
Timestamp:
Oct 25, 2009, 6:45:35 PM (13 years ago)
Author:
livings124
Message:

since the Mac UI is the only one to use it, move percentRatio calculation into the Mac code

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/Torrent.m

    r9402 r9403  
    344344- (CGFloat) progressStopRatio
    345345{
    346     return fStat->percentRatio;
     346    double seedRatio;
     347    if (!tr_torrentGetSeedRatio(fHandle, seedRatio) || [self ratio] >= seedRatio || [self ratio] == TR_RATIO_INF)
     348        return 1.0;
     349    else if ([self ratio] == TR_RATIO_NA)
     350        return 0.0;
     351    else
     352        return [self ratio] / seedRatio;
    347353}
    348354
Note: See TracChangeset for help on using the changeset viewer.