]> git.saurik.com Git - winterboard.git/blobdiff - Library.mm
Do not attempt to theme themes: that is insane.
[winterboard.git] / Library.mm
index b4b8988ac6425c1a323e2eac4104854aa6606319..cd2e5d07d92d93d380407fa1de61269e050e5d07 100644 (file)
@@ -246,6 +246,12 @@ static NSString *$getTheme$(NSArray *files, bool rescale = false) {
 
     for (NSString *theme in Themes_)
         for (NSString *file in files) {
+            if (rescale && /*$getScale$(file) == 1 &&*/ Scale_ == 2) {
+                path = [NSString stringWithFormat:@"%@/%@@2x.%@", theme, [file stringByDeletingPathExtension], [file pathExtension]];
+                if ([Manager_ fileExistsAtPath:path])
+                    goto set;
+            }
+
             path = [NSString stringWithFormat:@"%@/%@", theme, file];
             if ([Manager_ fileExistsAtPath:path])
                 goto set;
@@ -377,6 +383,9 @@ static NSString *$pathForIcon$(SBApplication *self, NSString *suffix = @"") {
 @implementation NSString (WinterBoard)
 
 - (NSString *) wb$themedPath {
+    if ([self hasPrefix:@"/Library/Themes/"])
+        return self;
+
     if (Debug_)
         NSLog(@"WB:Debug:Bypass(\"%@\")", self);