diff --git a/ios/RetroArch/RetroArch-Info.plist b/ios/RetroArch/RetroArch-Info.plist index 2abe058713..fc6a938111 100644 --- a/ios/RetroArch/RetroArch-Info.plist +++ b/ios/RetroArch/RetroArch-Info.plist @@ -26,6 +26,8 @@ UIApplicationExitsOnSuspend + UIFileSharingEnabled + UIRequiredDeviceCapabilities armv7 diff --git a/ios/RetroArch/RetroArch_iOS.m b/ios/RetroArch/RetroArch_iOS.m index cb2767e4de..09b96a3f9f 100644 --- a/ios/RetroArch/RetroArch_iOS.m +++ b/ios/RetroArch/RetroArch_iOS.m @@ -21,6 +21,9 @@ #import "input/BTStack/WiiMoteHelper.h" +#define kDOCSFOLDER [NSHomeDirectory() stringByAppendingPathComponent:@"Documents"] + + @implementation RetroArch_iOS { UIWindow* _window; @@ -49,13 +52,12 @@ // UIApplicationDelegate - (void)applicationDidFinishLaunching:(UIApplication *)application { - // TODO: Relocate this! - self.system_directory = @"/var/mobile/Library/RetroArch/"; + self.system_directory = [NSString stringWithFormat:@"%@/.RetroArch", kDOCSFOLDER]; mkdir([self.system_directory UTF8String], 0755); // Setup window self.delegate = self; - [self pushViewController:[RADirectoryList directoryListOrGridWithPath:nil] animated:YES]; + [self pushViewController:[RADirectoryList directoryListOrGridWithPath:kDOCSFOLDER] animated:YES]; _window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; _window.rootViewController = self; diff --git a/ios/RetroArch/browser/browser.m b/ios/RetroArch/browser/browser.m index f933658c1e..57f97e1ccf 100644 --- a/ios/RetroArch/browser/browser.m +++ b/ios/RetroArch/browser/browser.m @@ -67,7 +67,7 @@ NSArray* ra_ios_list_directory(NSString* path) for(struct dirent* item = readdir(dir); item; item = readdir(dir)) { - if (strcmp(item->d_name, ".") == 0 || strcmp(item->d_name, "..") == 0) + if (strncmp(item->d_name, ".", 1) == 0) continue; cpath[cpath_end] = 0;