]> git.saurik.com Git - winterboard.git/commitdiff
PNG files are themed when loaded, not when found.
authorJay Freeman (saurik) <saurik@saurik.com>
Tue, 2 Dec 2014 06:46:01 +0000 (22:46 -0800)
committerJay Freeman (saurik) <saurik@saurik.com>
Tue, 2 Dec 2014 06:46:01 +0000 (22:46 -0800)
Library.mm

index 2d112fb13a81bf12d998e5938947a0a76bc3a865..8e23695059b3c7216b41aed1ceb3293ce67ae082 100644 (file)
@@ -748,10 +748,13 @@ MSHook(CFURLRef, CFBundleCopyResourceURL, CFBundleRef bundle, CFStringRef resour
     if (subDirName != NULL)
         file = [NSString stringWithFormat:@"%@/%@", subDirName, resourceType];
 
-    if (Debug_)
-        NSLog(@"WB:Debug: CFBundleCopyResourceURL(<%@>, \"%@\", \"%@\", \"%@\")", CFBundleGetIdentifier(bundle), resourceName, resourceType, subDirName);
-    if (NSString *path = $pathForFile$inBundle$(file, bundle, false))
-        return (CFURLRef) [[NSURL alloc] initFileURLWithPath:path];
+    if (![file hasSuffix:@".png"]) {
+        if (Debug_)
+            NSLog(@"WB:Debug: CFBundleCopyResourceURL(<%@>, \"%@\", \"%@\", \"%@\")", CFBundleGetIdentifier(bundle), resourceName, resourceType, subDirName);
+        if (NSString *path = $pathForFile$inBundle$(file, bundle, false))
+            return (CFURLRef) [[NSURL alloc] initFileURLWithPath:path];
+    }
+
     return _CFBundleCopyResourceURL(bundle, resourceName, resourceType, subDirName);
 }
 // }}}