mirror of
https://github.com/libretro/RetroArch
synced 2025-04-01 04:20:27 +00:00
(CocoaTouch) Cleanups to cocoatouch_browser.m
This commit is contained in:
parent
fdfbf16b16
commit
892e65acee
@ -246,7 +246,7 @@ static void file_action(enum file_action action, NSString* source, NSString* tar
|
|||||||
settings_t *settings = config_get_ptr();
|
settings_t *settings = config_get_ptr();
|
||||||
|
|
||||||
self.path = path;
|
self.path = path;
|
||||||
self.title = self.path.lastPathComponent;
|
self.title = path.lastPathComponent;
|
||||||
|
|
||||||
/* Need one array per section. */
|
/* Need one array per section. */
|
||||||
self.sections = [NSMutableArray array];
|
self.sections = [NSMutableArray array];
|
||||||
@ -255,7 +255,7 @@ static void file_action(enum file_action action, NSString* source, NSString* tar
|
|||||||
[self.sections addObject:[NSMutableArray arrayWithObject:i]];
|
[self.sections addObject:[NSMutableArray arrayWithObject:i]];
|
||||||
|
|
||||||
/* List contents */
|
/* List contents */
|
||||||
contents = dir_list_new(self.path.UTF8String,
|
contents = dir_list_new(path.UTF8String,
|
||||||
settings->menu.navigation.browser.filter.supported_extensions_enable ? self.extensions.UTF8String : NULL, true);
|
settings->menu.navigation.browser.filter.supported_extensions_enable ? self.extensions.UTF8String : NULL, true);
|
||||||
|
|
||||||
if (contents)
|
if (contents)
|
||||||
@ -444,23 +444,16 @@ static void file_action(enum file_action action, NSString* source, NSString* tar
|
|||||||
{
|
{
|
||||||
if ((self = [super initWithStyle:UITableViewStyleGrouped]))
|
if ((self = [super initWithStyle:UITableViewStyleGrouped]))
|
||||||
{
|
{
|
||||||
NSString *sourceItem;
|
|
||||||
RAMenuItemBasic *parentItem;
|
|
||||||
NSMutableArray *items;
|
|
||||||
struct string_list* contents;
|
|
||||||
RAFoldersList* __weak weakSelf = self;
|
RAFoldersList* __weak weakSelf = self;
|
||||||
self.path = path;
|
NSString *sourceItem = path.stringByDeletingLastPathComponent; /* Parent item */
|
||||||
|
RAMenuItemBasic *parentItem = [RAMenuItemBasic itemWithDescription:BOXSTRING("<Parent>") association:sourceItem.stringByDeletingLastPathComponent
|
||||||
/* Parent item */
|
|
||||||
sourceItem = self.path.stringByDeletingLastPathComponent;
|
|
||||||
|
|
||||||
parentItem = [RAMenuItemBasic itemWithDescription:BOXSTRING("<Parent>") association:sourceItem.stringByDeletingLastPathComponent
|
|
||||||
action:^(id userdata){ [weakSelf moveInto:userdata]; } detail:NULL];
|
action:^(id userdata){ [weakSelf moveInto:userdata]; } detail:NULL];
|
||||||
|
struct string_list *contents = dir_list_new([path stringByDeletingLastPathComponent].UTF8String, NULL, true);
|
||||||
|
NSMutableArray *items = [NSMutableArray arrayWithObject:BOXSTRING("")];
|
||||||
|
|
||||||
[self.sections addObject:@[BOXSTRING(""), parentItem]];
|
[self.sections addObject:@[BOXSTRING(""), parentItem]];
|
||||||
|
|
||||||
/* List contents */
|
self.path = path;
|
||||||
contents = dir_list_new([self.path stringByDeletingLastPathComponent].UTF8String, NULL, true);
|
|
||||||
items = [NSMutableArray arrayWithObject:BOXSTRING("")];
|
|
||||||
|
|
||||||
if (contents)
|
if (contents)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user