mirror of
https://github.com/libretro/RetroArch
synced 2025-01-26 18:35:22 +00:00
(iOS) Display a warning message when loading a game from a directory without both read and write permissions.
Add a warning at startup when no libretro cores are installed.
This commit is contained in:
parent
2f0446917f
commit
85a329d7ec
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user