diff options
author | Jay Freeman (saurik) <saurik@saurik.com> | 2011-03-23 01:53:51 -0700 |
---|---|---|
committer | Jay Freeman (saurik) <saurik@saurik.com> | 2011-03-23 01:53:51 -0700 |
commit | 438d6708c8b0c27a0307b3c8ac336cf1583a56c1 (patch) | |
tree | ed464cabf83aaf667ca2aa67d629b1c76b838429 | |
parent | 0e15b67c86be0229b730885e19600f4768be2569 (diff) |
Work around /stupid/ screenSize miscalculation in WebKit.
-rw-r--r-- | MobileCydia.mm | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/MobileCydia.mm b/MobileCydia.mm index a85c12e..2713183 100644 --- a/MobileCydia.mm +++ b/MobileCydia.mm @@ -10344,6 +10344,10 @@ MSHook(id, NSURLConnection$init$, NSURLConnection *self, SEL _cmd, NSURLRequest } return self; } +static CGSize $WAKWindow$screenSize(id self, SEL _cmd) { + return [[UIScreen mainScreen] bounds].size; +} + int main(int argc, char *argv[]) { NSAutoreleasePool *pool([[NSAutoreleasePool alloc] init]); @@ -10410,6 +10414,10 @@ int main(int argc, char *argv[]) { /* Library Hacks {{{ */ class_addMethod(objc_getClass("DOMNodeList"), @selector(countByEnumeratingWithState:objects:count:), (IMP) &DOMNodeList$countByEnumeratingWithState$objects$count$, "I20@0:4^{NSFastEnumerationState}8^@12I16"); + if (Class $WAKWindow = objc_getClass("WAKWindow")) + if (Method method = class_getInstanceMethod($WAKWindow, @selector(screenSize))) + method_setImplementation(method, (IMP) &$WAKWindow$screenSize); + $CFXPreferencesPropertyListSource = objc_getClass("CFXPreferencesPropertyListSource"); Method CFXPreferencesPropertyListSource$_backingPlistChangedSinceLastSync(class_getInstanceMethod($CFXPreferencesPropertyListSource, @selector(_backingPlistChangedSinceLastSync))); |