From: Jay Freeman (saurik) Date: Tue, 2 Dec 2014 06:46:01 +0000 (-0800) Subject: PNG files are themed when loaded, not when found. X-Git-Tag: v0.9.3918~5 X-Git-Url: https://git.saurik.com/winterboard.git/commitdiff_plain/f4fced4e1671514225c3dc3ba1ef57365c5c0f2c PNG files are themed when loaded, not when found. --- diff --git a/Library.mm b/Library.mm index 2d112fb..8e23695 100644 --- a/Library.mm +++ b/Library.mm @@ -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); } // }}}