mirror of
https://github.com/libretro/ppsspp.git
synced 2024-11-24 08:39:51 +00:00
Update ViewController.mm
Update a jailbreak detection.
This commit is contained in:
parent
60f9906bf2
commit
71b8a30c65
@ -34,6 +34,7 @@ extern ScreenManager *screenManager;
|
||||
InputState input_state;
|
||||
|
||||
extern std::string ram_temp_file;
|
||||
extern bool isJailed;
|
||||
|
||||
ViewController* sharedViewController;
|
||||
|
||||
@ -70,6 +71,21 @@ ViewController* sharedViewController;
|
||||
ram_temp_file = [[NSTemporaryDirectory() stringByAppendingPathComponent:@"ram_tmp.file"] fileSystemRepresentation];
|
||||
NativeInit(0, NULL, [self.documentsPath UTF8String], [self.bundlePath UTF8String], NULL);
|
||||
|
||||
isJailed = true;
|
||||
|
||||
NSArray *jailPath = [NSArray arrayWithObjects:
|
||||
@"/Applications/Cydia.app",
|
||||
@"/private/var/lib/apt" ,
|
||||
@"/private/var/stash" ,
|
||||
@"/usr/sbin/sshd" ,
|
||||
@"/usr/bin/sshd" , nil];
|
||||
|
||||
for(NSString *string in jailPath)
|
||||
{
|
||||
if ([[NSFileManager defaultManager] fileExistsAtPath:string])
|
||||
isJailed = false;
|
||||
}
|
||||
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user