From: Jay Freeman (saurik) Date: Sun, 12 Jan 2014 14:23:34 +0000 (-0800) Subject: Apparently, Zephyr hooks NSLog?! ...and I crash?! X-Git-Tag: v0.9.3912~2 X-Git-Url: https://git.saurik.com/winterboard.git/commitdiff_plain/6fa3da5973d55505a0d4f454f7e0eee6a5748b0c Apparently, Zephyr hooks NSLog?! ...and I crash?! --- diff --git a/Library.mm b/Library.mm index 36cca9e..fda60e5 100644 --- a/Library.mm +++ b/Library.mm @@ -860,7 +860,7 @@ MSInstanceMessageHook7(CGSize, NSString, _drawInRect,withFont,lineBreakMode,alig } MSInstanceMessage2(void, NSString, drawInRect,withAttributes, CGRect, rect, NSDictionary *, attributes) { - NSLog(@"XXX: *\"%@\" %@", self, attributes); + //NSLog(@"XXX: *\"%@\" %@", self, attributes); WBStringDrawingState *state(stringDrawingState_); if (state == NULL) @@ -886,7 +886,7 @@ MSInstanceMessage2(void, NSString, drawInRect,withAttributes, CGRect, rect, NSDi extern "C" NSString *NSStringFromCGSize(CGSize size); MSInstanceMessage4(CGRect, NSString, boundingRectWithSize,options,attributes,context, CGSize, size, NSInteger, options, NSDictionary *, attributes, id, context) { - NSLog(@"XXX: $\"%@\" %@ 0x%x %@ %@", self, NSStringFromCGSize(size), unsigned(options), attributes, context); + //NSLog(@"XXX: $\"%@\" %@ 0x%x %@ %@", self, NSStringFromCGSize(size), unsigned(options), attributes, context); WBStringDrawingState *state(stringDrawingState_); if (state == NULL) @@ -2277,8 +2277,10 @@ static void SBInitialize() { if (SummerBoard_) English_ = [[NSDictionary alloc] initWithContentsOfFile:@"/System/Library/CoreServices/SpringBoard.app/English.lproj/LocalizedApplicationNames.strings"]; - WBRename(NSString, drawInRect:withAttributes:, drawInRect$withAttributes$); - WBRename(NSString, boundingRectWithSize:options:attributes:context:, boundingRectWithSize$options$attributes$context$); + if (kCFCoreFoundationVersionNumber >= 800) { + WBRename(NSString, drawInRect:withAttributes:, drawInRect$withAttributes$); + WBRename(NSString, boundingRectWithSize:options:attributes:context:, boundingRectWithSize$options$attributes$context$); + } } /*MSHook(int, open, const char *path, int oflag, mode_t mode) {