|
@@ -42,7 +42,8 @@ typedef NS_ENUM(NSInteger, BSInstallType) {
|
|
|
@interface ViewController () {
|
|
|
|
|
|
BOOL _respringReady;
|
|
|
-
|
|
|
+ UITapGestureRecognizer *playPauseOrMenuDoubleTapRecognizer;
|
|
|
+ BOOL kppless;
|
|
|
}
|
|
|
|
|
|
|
|
@@ -205,9 +206,52 @@ bool jailbreak_has_run = false;
|
|
|
//DB1E00
|
|
|
//CACBCA
|
|
|
|
|
|
+ playPauseOrMenuDoubleTapRecognizer = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(handleDoubleTapMenuOrPlayPause:)];
|
|
|
+ playPauseOrMenuDoubleTapRecognizer.numberOfTapsRequired = 2;
|
|
|
+ playPauseOrMenuDoubleTapRecognizer.allowedPressTypes = @[[NSNumber numberWithInteger:UIPressTypePlayPause], [NSNumber numberWithInteger:UIPressTypeMenu]];
|
|
|
+ [self.view addGestureRecognizer:playPauseOrMenuDoubleTapRecognizer];
|
|
|
|
|
|
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+-(void)handleDoubleTapMenuOrPlayPause:(UITapGestureRecognizer *)sender {
|
|
|
|
|
|
+
|
|
|
+ if (sender.state == UIGestureRecognizerStateEnded) {
|
|
|
+
|
|
|
+
|
|
|
+ NSString *kpplessString = @"KPPless: OFF";
|
|
|
+ if (kppless) {
|
|
|
+
|
|
|
+ kpplessString = @"KPPless: ON";
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ UIAlertController *alertController = [UIAlertController
|
|
|
+ alertControllerWithTitle:@"KPPless?"
|
|
|
+ message:@"Turn KPPless on if you are attempting to futurerestore to a newer version"
|
|
|
+ preferredStyle:UIAlertControllerStyleAlert];
|
|
|
+ UIAlertAction *kpplessAction = [UIAlertAction
|
|
|
+ actionWithTitle:kpplessString
|
|
|
+ style:UIAlertActionStyleDefault
|
|
|
+ handler:^(UIAlertAction *action)
|
|
|
+ {
|
|
|
+
|
|
|
+ kppless = !kppless;
|
|
|
+
|
|
|
+ }];
|
|
|
+
|
|
|
+ [alertController addAction:kpplessAction];
|
|
|
+
|
|
|
+ UIAlertAction *cancel = [UIAlertAction actionWithTitle:@"Cancel" style:UIAlertActionStyleCancel handler:nil];
|
|
|
+
|
|
|
+ [alertController addAction:cancel];
|
|
|
+
|
|
|
+ [self presentViewController:alertController animated:YES completion:nil];
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
- (void)setGoButtonTitle:(NSString *)title {
|
|
@@ -227,6 +271,8 @@ bool jailbreak_has_run = false;
|
|
|
[super viewDidLoad];
|
|
|
|
|
|
|
|
|
+ kppless = FALSE;
|
|
|
+
|
|
|
thisClass = self;
|
|
|
|
|
|
|
|
@@ -409,7 +455,7 @@ bool jailbreak_has_run = false;
|
|
|
|
|
|
// background thread so we can update the UI
|
|
|
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0), ^(void) {
|
|
|
- int ret = makeShitHappen(self);
|
|
|
+ int ret = makeShitHappen(self, kppless);
|
|
|
|
|
|
if (ret != 0) {
|
|
|
NSLog(@"MERIDIAN HAS FAILED TO RUN :(");
|