mirror of
https://github.com/libretro/RetroArch
synced 2025-02-28 22:13:51 +00:00
ios: File browser now tries to root itself at '/var/mobile/RetroArchGames' and '/var/mobile' before settling on '/'.
This commit is contained in:
parent
4a8831cbdd
commit
64673845dd
@ -23,6 +23,13 @@ static BOOL is_directory(NSString* path)
|
|||||||
{
|
{
|
||||||
self = [super initWithStyle:UITableViewStylePlain];
|
self = [super initWithStyle:UITableViewStylePlain];
|
||||||
|
|
||||||
|
if (path == nil)
|
||||||
|
{
|
||||||
|
if (is_directory(@"/var/mobile/RetroArchGames")) path = @"/var/mobile/RetroArchGames";
|
||||||
|
else if (is_directory(@"/var/mobile")) path = @"/var/mobile";
|
||||||
|
else path = @"/";
|
||||||
|
}
|
||||||
|
|
||||||
directory = path;
|
directory = path;
|
||||||
|
|
||||||
list = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:directory error:nil];
|
list = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:directory error:nil];
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
|
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
|
||||||
{
|
{
|
||||||
[RetroArch_iOS get].module_path = [modules objectAtIndex:indexPath.row];
|
[RetroArch_iOS get].module_path = [modules objectAtIndex:indexPath.row];
|
||||||
[[RetroArch_iOS get].navigator pushViewController:[[directory_list alloc] initWithPath:@"/"] animated:YES];
|
[[RetroArch_iOS get].navigator pushViewController:[[directory_list alloc] initWithPath:nil] animated:YES];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
|
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
|
||||||
|
Loading…
x
Reference in New Issue
Block a user