summaryrefslogtreecommitdiff
path: root/MobileCydia.mm
diff options
context:
space:
mode:
Diffstat (limited to 'MobileCydia.mm')
-rw-r--r--MobileCydia.mm20
1 files changed, 5 insertions, 15 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]))