diff --git a/ios/RetroArch/browser/browser.m b/ios/RetroArch/browser/browser.m index d8885968a3..9590d697c2 100644 --- a/ios/RetroArch/browser/browser.m +++ b/ios/RetroArch/browser/browser.m @@ -29,6 +29,7 @@ @implementation RADirectoryList { NSMutableArray* _list; + NSString* _path; } + (id)directoryListAtBrowseRoot @@ -47,6 +48,8 @@ - (id)initWithPath:(NSString*)path { + _path = path; + self = [super initWithStyle:UITableViewStylePlain]; [self setTitle: [path lastPathComponent]]; @@ -93,7 +96,13 @@ if(path.isDirectory) [[RetroArch_iOS get] pushViewController:[RADirectoryList directoryListForPath:path.path] animated:YES]; else + { + if (access(_path.UTF8String, R_OK | W_OK | X_OK)) + [RetroArch_iOS displayErrorMessage:@"The directory containing the selected file has limited permissions. This may " + "prevent zipped games from loading, and will cause some cores to not function."]; + [[RetroArch_iOS get] pushViewController:[[RAModuleList alloc] initWithGame:path.path] animated:YES]; + } } - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView diff --git a/ios/RetroArch/main.m b/ios/RetroArch/main.m index e8e5b32834..a02fcafcc9 100644 --- a/ios/RetroArch/main.m +++ b/ios/RetroArch/main.m @@ -279,6 +279,10 @@ static void event_reload_config(void* userdata) [self pushViewController:[RADirectoryList directoryListAtBrowseRoot] animated:YES]; [self refreshSystemConfig]; } + + // Warn if there are no cores present + if ([RAModuleInfo getModules].count == 0) + [RetroArch_iOS displayErrorMessage:@"No libretro cores were found. You will not be able to play any games."]; } - (void)applicationWillEnterForeground:(UIApplication *)application