mirror of
https://github.com/libretro/RetroArch
synced 2025-02-21 09:39:56 +00:00
Fixing Use Empty Path on directory settings
This commit is contained in:
parent
4f15c31a16
commit
bdac9e9717
@ -416,16 +416,23 @@ static void RunActionSheet(const char* title, const struct string_list* items, U
|
|||||||
list = [[RADirectoryList alloc] initWithPath:path extensions:self.setting->values action:
|
list = [[RADirectoryList alloc] initWithPath:path extensions:self.setting->values action:
|
||||||
^(RADirectoryList* list, RADirectoryItem* item)
|
^(RADirectoryList* list, RADirectoryItem* item)
|
||||||
{
|
{
|
||||||
if (!list.allowBlank && !item)
|
const char *newval = NULL;
|
||||||
|
if (item) {
|
||||||
|
if (list.forDirectory && !item.isDirectory)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (list.forDirectory && !item.isDirectory)
|
newval = [item.path UTF8String];
|
||||||
|
} else {
|
||||||
|
if (!list.allowBlank)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
newval = "";
|
||||||
|
}
|
||||||
|
|
||||||
|
setting_data_set_with_string_representation(weakSelf.setting, newval);
|
||||||
|
[[list navigationController] popViewControllerAnimated:YES];
|
||||||
|
|
||||||
setting_data_set_with_string_representation(weakSelf.setting, item ? [item.path UTF8String] : "");
|
[weakSelf.parentTable reloadData];
|
||||||
[[list navigationController] popViewControllerAnimated:YES];
|
|
||||||
|
|
||||||
[weakSelf.parentTable reloadData];
|
|
||||||
}];
|
}];
|
||||||
|
|
||||||
list.allowBlank = (self.setting->flags & SD_FLAG_ALLOW_EMPTY);
|
list.allowBlank = (self.setting->flags & SD_FLAG_ALLOW_EMPTY);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user