From f87d3e2322f23c0899b63419a7d54d489c24e5f1 Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Wed, 3 Dec 2014 23:58:47 -0800 Subject: [PATCH] Carefully prioritize the available image scalings. --- Library.mm | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) 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 -- 2.45.2