diff options
-rw-r--r-- | MobileCydia.mm | 20 | ||||
-rw-r--r-- | iPhonePrivate.h | 4 |
2 files changed, 5 insertions, 19 deletions
diff --git a/MobileCydia.mm b/MobileCydia.mm index 68b6fbc..aa8ad52 100644 --- a/MobileCydia.mm +++ b/MobileCydia.mm @@ -10524,12 +10524,6 @@ int main(int argc, char *argv[]) { UpdateExternalStatus(0); - if (Class $UIDevice = objc_getClass("UIDevice")) { - UIDevice *device([$UIDevice currentDevice]); - IsWildcat_ = [device respondsToSelector:@selector(isWildcat)] && [device isWildcat]; - } else - IsWildcat_ = false; - UIScreen *screen([UIScreen mainScreen]); if ([screen respondsToSelector:@selector(scale)]) ScreenScale_ = [screen scale]; @@ -10537,18 +10531,14 @@ int main(int argc, char *argv[]) { ScreenScale_ = 1; UIDevice *device([UIDevice currentDevice]); - if (![device respondsToSelector:@selector(userInterfaceIdiom)]) - Idiom_ = @"iphone"; - else { + if ([device respondsToSelector:@selector(userInterfaceIdiom)]) { UIUserInterfaceIdiom idiom([device userInterfaceIdiom]); - if (idiom == UIUserInterfaceIdiomPhone) - Idiom_ = @"iphone"; - else if (idiom == UIUserInterfaceIdiomPad) - Idiom_ = @"ipad"; - else - NSLog(@"unknown UIUserInterfaceIdiom!"); + if (idiom == UIUserInterfaceIdiomPad) + IsWildcat_ = true; } + Idiom_ = IsWildcat_ ? @"ipad" : @"iphone"; + Pcre pattern("^([0-9]+\\.[0-9]+)"); if (pattern([device systemVersion])) diff --git a/iPhonePrivate.h b/iPhonePrivate.h index 08e0a33..6f4e706 100644 --- a/iPhonePrivate.h +++ b/iPhonePrivate.h @@ -246,10 +246,6 @@ typedef enum { - (void) addTarget:(id)target action:(SEL)action forEvents:(NSInteger)events; @end -@interface UIDevice (Apple) -- (BOOL) isWildcat; -@end - @interface UIImage (Apple) + (UIImage *) applicationImageNamed:(NSString *)name; + (UIImage *) imageAtPath:(NSString *)path; |