diff options
author | Jay Freeman (saurik) <saurik@saurik.com> | 2017-03-03 19:06:54 -0800 |
---|---|---|
committer | Jay Freeman (saurik) <saurik@saurik.com> | 2017-03-03 19:06:54 -0800 |
commit | f3454874c6097225d806fb2fc9f4fb9e19de6abe (patch) | |
tree | 2bad1cf620b830fff7dcd87431176e3cd92cdecd /MobileCydia.mm | |
parent | e65eba85e36a518ccad605c715a88b4ee59ce439 (diff) |
Trial move some key global variables into CyteKit.
Diffstat (limited to 'MobileCydia.mm')
-rw-r--r-- | MobileCydia.mm | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/MobileCydia.mm b/MobileCydia.mm index a16f194..d6ef9c9 100644 --- a/MobileCydia.mm +++ b/MobileCydia.mm @@ -735,8 +735,6 @@ _H<NSMutableDictionary> Sources_; static _transient NSNumber *Version_; static time_t now_; -bool IsWildcat_; -CGFloat ScreenScale_; static NSString *Idiom_; static _H<NSString> Firmware_; static NSString *Major_; @@ -9979,25 +9977,14 @@ int main(int argc, char *argv[]) { UpdateExternalStatus(0); - UIScreen *screen([UIScreen mainScreen]); - if ([screen respondsToSelector:@selector(scale)]) - ScreenScale_ = [screen scale]; - else - ScreenScale_ = 1; - - UIDevice *device([UIDevice currentDevice]); - if ([device respondsToSelector:@selector(userInterfaceIdiom)]) { - UIUserInterfaceIdiom idiom([device userInterfaceIdiom]); - if (idiom == UIUserInterfaceIdiomPad) - IsWildcat_ = true; - } - Idiom_ = IsWildcat_ ? @"ipad" : @"iphone"; RegEx pattern("([0-9]+\\.[0-9]+).*"); + UIDevice *device([UIDevice currentDevice]); if (pattern([device systemVersion])) Firmware_ = pattern[1]; + if (pattern(Cydia_)) Major_ = pattern[1]; |