From 3869239aceb028b873d10fc73a1f0ec4bf2f4698 Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Sat, 2 Feb 2013 08:48:31 +0000 Subject: [PATCH] Allow theming SystemAppExited from BackBoardServices. --- Library.mm | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Library.mm b/Library.mm index 7d44ff2..1b1a870 100644 --- a/Library.mm +++ b/Library.mm @@ -2068,6 +2068,12 @@ MSHook(NSArray *, CPBitmapCreateImagesFromPath, NSString *path, NSDictionary **n } 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) @@ -2309,6 +2315,13 @@ MSInitialize { 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); -- 2.45.2