]> git.saurik.com Git - winterboard.git/commitdiff
Add GSSystemHasCapability.
authorJay Freeman (saurik) <saurik@saurik.com>
Fri, 7 Oct 2011 09:04:18 +0000 (09:04 +0000)
committerJay Freeman (saurik) <saurik@saurik.com>
Fri, 7 Oct 2011 09:04:18 +0000 (09:04 +0000)
Library.mm

index 084ab9aee684db4f13e56d639bc80ad7537e6da7..ffe6f12141350a843f9557bcb874d86862eb9eb1 100644 (file)
@@ -776,9 +776,11 @@ MSHook(id, SBUIController$init, SBUIController *self, SEL sel) {
     UIDevice *device([UIDevice currentDevice]);
     IsWild_ = [device respondsToSelector:@selector(isWildcat)] && [device isWildcat];
 
+    BOOL (*GSSystemHasCapability)(CFStringRef) = reinterpret_cast<BOOL (*)(CFStringRef)>(dlsym(RTLD_DEFAULT, "GSSystemHasCapability"));
+
     if ([Info_ objectForKey:@"UndockedIconLabels"] == nil)
         [Info_ setObject:[NSNumber numberWithBool:(
-            !(Papered_ || GSSystemHasCapability(CFSTR("homescreen-wallpaper"))) ||
+            !(Papered_ || GSSystemHasCapability != NULL && GSSystemHasCapability(CFSTR("homescreen-wallpaper"))) ||
             [Info_ objectForKey:@"DockedIconLabelStyle"] != nil ||
             [Info_ objectForKey:@"UndockedIconLabelStyle"] != nil
         )] forKey:@"UndockedIconLabels"];