Skip to content

Commit

Permalink
Merge branch '2.1.3-legacy' of [email protected]:PojavLauncherTeam/Pojav…
Browse files Browse the repository at this point in the history
…Launcher_iOS.git
  • Loading branch information
crystall1nedev committed Jan 17, 2023
2 parents b129aa1 + 4c229a2 commit bb4c79d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Natives/main.m
Original file line number Diff line number Diff line change
Expand Up @@ -313,8 +313,11 @@ int main(int argc, char * argv[]) {
setenv("BUNDLE_PATH", dirname(argv[0]), 1);
setenv("HOME", [NSFileManager.defaultManager URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask]
.lastObject.path.stringByDeletingLastPathComponent.UTF8String, 1);
// WARNING: THIS DIRECTS TO /var/mobile/Documents IF INSTALLED WITH APPSYNC UNIFIED
setenv("POJAV_HOME", [NSString stringWithFormat:@"%s/Documents", getenv("HOME")].UTF8String, 1);
if(strcmp(getenv("HOME"), "/var/mobile") == 0) {
setenv("POJAV_HOME", [NSString stringWithFormat:@"%s/Documents/PojavLauncher", getenv("HOME")].UTF8String, 1);
} else {
setenv("POJAV_HOME", [NSString stringWithFormat:@"%s/Documents", getenv("HOME")].UTF8String, 1);
}

[fm createDirectoryAtPath:@(getenv("POJAV_HOME")) withIntermediateDirectories:NO attributes:nil error:nil];

Expand Down

0 comments on commit bb4c79d

Please sign in to comment.