]> git.saurik.com Git - winterboard.git/blobdiff - Library.mm
Add .gitignore.
[winterboard.git] / Library.mm
index e882c2534de9ccd765629ebb6b156628358656cf..084ab9aee684db4f13e56d639bc80ad7537e6da7 100644 (file)
@@ -776,6 +776,16 @@ MSHook(id, SBUIController$init, SBUIController *self, SEL sel) {
     UIDevice *device([UIDevice currentDevice]);
     IsWild_ = [device respondsToSelector:@selector(isWildcat)] && [device isWildcat];
 
     UIDevice *device([UIDevice currentDevice]);
     IsWild_ = [device respondsToSelector:@selector(isWildcat)] && [device isWildcat];
 
+    if ([Info_ objectForKey:@"UndockedIconLabels"] == nil)
+        [Info_ setObject:[NSNumber numberWithBool:(
+            !(Papered_ || GSSystemHasCapability(CFSTR("homescreen-wallpaper"))) ||
+            [Info_ objectForKey:@"DockedIconLabelStyle"] != nil ||
+            [Info_ objectForKey:@"UndockedIconLabelStyle"] != nil
+        )] forKey:@"UndockedIconLabels"];
+
+    if (Debug_)
+        NSLog(@"WB:Debug:Info = %@", [Info_ description]);
+
     if (Papered_) {
         UIImageView *&_wallpaperView(MSHookIvar<UIImageView *>(self, "_wallpaperView"));
         if (&_wallpaperView != NULL) {
     if (Papered_) {
         UIImageView *&_wallpaperView(MSHookIvar<UIImageView *>(self, "_wallpaperView"));
         if (&_wallpaperView != NULL) {
@@ -1394,6 +1404,8 @@ MSHook(void, TranscriptController$loadView, mSMSMessageTranscriptController *sel
 MSHook(UIImage *, _UIImageWithName, NSString *name) {
     if (Debug_)
         NSLog(@"WB:Debug: _UIImageWithName(\"%@\")", name);
 MSHook(UIImage *, _UIImageWithName, NSString *name) {
     if (Debug_)
         NSLog(@"WB:Debug: _UIImageWithName(\"%@\")", name);
+    if (name == nil)
+        return nil;
 
     int identifier;
     bool packed;
 
     int identifier;
     bool packed;
@@ -1801,15 +1813,5 @@ extern "C" void WBInitialize() {
 
     Docked_ = $getTheme$([NSArray arrayWithObjects:@"Dock.png", nil]);
 
 
     Docked_ = $getTheme$([NSArray arrayWithObjects:@"Dock.png", nil]);
 
-    if ([Info_ objectForKey:@"UndockedIconLabels"] == nil)
-        [Info_ setObject:[NSNumber numberWithBool:(
-            !Papered_ ||
-            [Info_ objectForKey:@"DockedIconLabelStyle"] != nil ||
-            [Info_ objectForKey:@"UndockedIconLabelStyle"] != nil
-        )] forKey:@"UndockedIconLabels"];
-
-    if (Debug_)
-        NSLog(@"WB:Debug:Info = %@", [Info_ description]);
-
     [pool release];
 }
     [pool release];
 }