From f4fced4e1671514225c3dc3ba1ef57365c5c0f2c Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Mon, 1 Dec 2014 22:46:01 -0800 Subject: [PATCH] PNG files are themed when loaded, not when found. --- Library.mm | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) 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); } // }}} -- 2.50.0