From 179b9afbafa22c3b07232675ea1fcb1e71a7e44a Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Thu, 17 Jan 2013 06:24:56 +0000 Subject: [PATCH] iOS <4.x had private ImageIO (thanks forevermac!). --- Library.mm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Library.mm b/Library.mm index 369b1d0..716413c 100644 --- a/Library.mm +++ b/Library.mm @@ -2279,7 +2279,10 @@ MSInitialize { } // }}} // ImageIO {{{ - if (MSImageRef image = MSGetImageByName("/System/Library/Frameworks/ImageIO.framework/ImageIO")) { + MSImageRef imageio = MSGetImageByName("/System/Library/Frameworks/ImageIO.framework/ImageIO"); + if (imageio == NULL) + imageio = MSGetImageByName("/System/Library/PrivateFrameworks/ImageIO.framework/ImageIO"); + if (MSImageRef image = imageio) { void *(*CGImageReadCreateWithFile)(NSString *, int); msset(CGImageReadCreateWithFile, image, "_CGImageReadCreateWithFile"); MSHookFunction(CGImageReadCreateWithFile, MSHake(CGImageReadCreateWithFile)); -- 2.45.2