]> git.saurik.com Git - winterboard.git/commitdiff
@thekirbylover fix for @TCcentex Facebook icon bug.
authorJay Freeman (saurik) <saurik@saurik.com>
Sat, 7 Sep 2013 08:58:23 +0000 (08:58 +0000)
committerJay Freeman (saurik) <saurik@saurik.com>
Sat, 7 Sep 2013 08:58:23 +0000 (08:58 +0000)
Library.mm

index 9202ca3ac6a9445163eb34e3207382cb56df3543..f661bc035b8d3976d49b3d048ab777a696cb850d 100644 (file)
@@ -1894,28 +1894,28 @@ MSInstanceMessageHook0(void, CKTranscriptController, loadView) {
 }
 // }}}
 
-MSInstanceMessage2(UISharedArtwork *, UISharedArtwork, initWithName,inBundle, NSString *, name, NSBundle *, bundle) {
+MSInstanceMessage2(UIImageTableArtwork *, UIImageTableArtwork, initWithName,inBundle, NSString *, name, NSBundle *, bundle) {
     if ((self = MSOldCall(name, bundle)) != nil) {
         $objc_setAssociatedObject(self, @selector(wb$bundle), bundle, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
     } return self;
 }
 
-MSInstanceMessage1(UIImage *, UIImageTableArtwork, imageNamed, NSString *, name) {
+MSInstanceMessage2(UIImage *, UIImageTableArtwork, imageNamed,device, NSString *, name, int, device) {
     NSBundle *bundle($objc_getAssociatedObject(self, @selector(wb$bundle)));
     if (Debug_)
-        NSLog(@"WB:Debug:[UIImageTableArtwork[%@] imageNamed:\"%@\"]", bundle, name);
+        NSLog(@"WB:Debug:[UIImageTableArtwork[%@] imageNamed:\"%@\" device:%i]", bundle, name, device);
     if (bundle == nil)
-        return MSOldCall(name);
+        return MSOldCall(name, device);
     UIImage *image = [UIImages_ objectForKey:name];
     if (image != nil)
-        return reinterpret_cast<id>(image) == [NSNull null] ? MSOldCall(name) : image;
+        return reinterpret_cast<id>(image) == [NSNull null] ? MSOldCall(name, device) : image;
     if (NSString *path = $pathForFile$inBundle$(name, bundle, true, true))
         image = $getImage$(path);
     [UIImages_ setObject:(image == nil ? [NSNull null] : reinterpret_cast<id>(image)) forKey:name];
     if (image != nil)
         return image;
 
-    image = MSOldCall(name);
+    image = MSOldCall(name, device);
 
     if (UIDebug_) {
         NSString *path([@"/tmp/UIImages/" stringByAppendingString:name]);
@@ -2408,8 +2408,8 @@ MSInitialize {
         class_addMethod($NSString, @selector(sizeWithStyle:forWidth:), (IMP) &NSString$sizeWithStyle$forWidth$, "{CGSize=ff}16@0:4@8f12");
 
         if (kCFCoreFoundationVersionNumber > 700) { // XXX: iOS 6.x
-            WBRename(UISharedArtwork, initWithName:inBundle:, initWithName$inBundle$);
-            WBRename(UIImageTableArtwork, imageNamed:, imageNamed$);
+            WBRename(UIImageTableArtwork, initWithName:inBundle:, initWithName$inBundle$);
+            WBRename(UIImageTableArtwork, imageNamed:device:, imageNamed$device$);
         } else {
             struct nlist nl[6];
             memset(nl, 0, sizeof(nl));