X-Git-Url: https://git.saurik.com/winterboard.git/blobdiff_plain/1d3b613ff73deb265588b0bf4a393ce1e6a98963..fa2bffc41753cdb90ad2428d6358bda8d46f2530:/Application.mm diff --git a/Application.mm b/Application.mm index aa4397f..f033c3f 100644 --- a/Application.mm +++ b/Application.mm @@ -39,11 +39,16 @@ #import #import +#include + #import #import #import #import +#include +#include + static NSBundle *wbSettingsBundle; static Class $WBSettingsController; @@ -168,7 +173,7 @@ static Class $WBSettingsController; $WBSettingsController = [wbSettingsBundle principalClass]; CGRect applicationFrame(([UIDevice instancesRespondToSelector:@selector(isWildcat)] - && [[UIDevice currentDevice] isWildcat]) + && [[UIDevice currentDevice] isWildcat]) || objc_getClass("UIStatusBar") != nil ? [UIScreen mainScreen].bounds : [UIScreen mainScreen].applicationFrame); UIWindow *window([[UIWindow alloc] initWithFrame:applicationFrame]); @@ -179,9 +184,17 @@ static Class $WBSettingsController; @end +MSHook(int32_t, NSVersionOfLinkTimeLibrary, const char *name) { + if (strcmp(name, "UIKit") == 0) + return 0x6400000; + return _NSVersionOfLinkTimeLibrary(name); +} + int main(int argc, char *argv[]) { NSAutoreleasePool *pool( [[NSAutoreleasePool alloc] init]); + MSHookFunction(NSVersionOfLinkTimeLibrary, MSHake(NSVersionOfLinkTimeLibrary)); + int value = UIApplicationMain(argc, argv, @"WBApplication", @"WBApplication"); [pool release];