From: Jay Freeman (saurik) Date: Thu, 4 Dec 2014 07:58:47 +0000 (-0800) Subject: Carefully prioritize the available image scalings. X-Git-Tag: v0.9.3918~4 X-Git-Url: https://git.saurik.com/winterboard.git/commitdiff_plain/f87d3e2322f23c0899b63419a7d54d489c24e5f1 Carefully prioritize the available image scalings. --- diff --git a/Library.mm b/Library.mm index 8e23695..3372ddd 100644 --- a/Library.mm +++ b/Library.mm @@ -305,11 +305,17 @@ static NSArray *$useScale$(NSArray *files, bool use = true) { NSString *extension([file pathExtension]); if (use) { - for (unsigned scale(2); scale <= Scale_; ++scale) { - [scaled addObject:[NSString stringWithFormat:@"%@@%ux~%@.%@", base, scale, idiom, extension]]; - [scaled addObject:[NSString stringWithFormat:@"%@@%ux.%@", base, scale, extension]]; + if (Scale_ != 1) { + [scaled addObject:[NSString stringWithFormat:@"%@@%ux~%@.%@", base, Scale_, idiom, extension]]; + [scaled addObject:[NSString stringWithFormat:@"%@@%ux.%@", base, Scale_, extension]]; } + for (unsigned scale(3); scale >= 2; --scale) + if (scale != Scale_) { + [scaled addObject:[NSString stringWithFormat:@"%@@%ux~%@.%@", base, scale, idiom, extension]]; + [scaled addObject:[NSString stringWithFormat:@"%@@%ux.%@", base, scale, extension]]; + } + [scaled addObject:[NSString stringWithFormat:@"%@~%@.%@", base, idiom, extension]]; // if (!IsWild_) <- support old themes