]> git.saurik.com Git - winterboard.git/commitdiff
Allow theming SystemAppExited from BackBoardServices.
authorJay Freeman (saurik) <saurik@saurik.com>
Sat, 2 Feb 2013 08:48:31 +0000 (08:48 +0000)
committerJay Freeman (saurik) <saurik@saurik.com>
Sat, 2 Feb 2013 08:48:31 +0000 (08:48 +0000)
Library.mm

index 7d44ff25f5395651605b840648ceef0a1a21498c..1b1a8703955a1704c8fefa2b2b9755cf66865402 100644 (file)
@@ -2068,6 +2068,12 @@ MSHook(NSArray *, CPBitmapCreateImagesFromPath, NSString *path, NSDictionary **n
     } return images;
 }
 
     } return images;
 }
 
+MSHook(void, BKSDisplayServicesSetSystemAppExitedImagePath, NSString *path) {
+    if (NSString *themed = $getTheme$($useScale$([NSArray arrayWithObject:@"SystemAppExited.png"])))
+        path = themed;
+    _BKSDisplayServicesSetSystemAppExitedImagePath(path);
+}
+
 #define WBRename(name, sel, imp) \
     MSHookMessage($ ## name, @selector(sel), &$ ## name ## $ ## imp, &_ ## name ## $ ## imp)
 
 #define WBRename(name, sel, imp) \
     MSHookMessage($ ## name, @selector(sel), &$ ## name ## $ ## imp, &_ ## name ## $ ## imp)
 
@@ -2309,6 +2315,13 @@ MSInitialize {
         MSHookFunction(_Z24GetFileNameForThisActionmPcRb, &$_Z24GetFileNameForThisActionmPcRb, &__Z24GetFileNameForThisActionmPcRb);
     }
     // }}}
         MSHookFunction(_Z24GetFileNameForThisActionmPcRb, &$_Z24GetFileNameForThisActionmPcRb, &__Z24GetFileNameForThisActionmPcRb);
     }
     // }}}
+    // BackBoardServices {{{
+    if (MSImageRef image = MSGetImageByName("/System/Library/PrivateFrameworks/BackBoardServices.framework/BackBoardServices")) {
+        void (*BKSDisplayServicesSetSystemAppExitedImagePath)(NSString *path);
+        msset(BKSDisplayServicesSetSystemAppExitedImagePath, image, "_BKSDisplayServicesSetSystemAppExitedImagePath");
+        MSHookFunction(BKSDisplayServicesSetSystemAppExitedImagePath, MSHake(BKSDisplayServicesSetSystemAppExitedImagePath));
+    }
+    // }}}
     // GraphicsServices {{{
     if (true) {
         MSHookFunction(&GSFontCreateWithName, &$GSFontCreateWithName, &_GSFontCreateWithName);
     // GraphicsServices {{{
     if (true) {
         MSHookFunction(&GSFontCreateWithName, &$GSFontCreateWithName, &_GSFontCreateWithName);