Change menu_entry_pathdir_get_value and menu_entry_pathdir_get_extensions

This commit is contained in:
twinaphex 2015-05-10 18:18:46 +02:00
parent 8d5cb71fca
commit 4b0435ff42
2 changed files with 9 additions and 7 deletions

View File

@ -183,10 +183,11 @@ uint32_t menu_entry_pathdir_for_directory(uint32_t i)
return setting->flags & SD_FLAG_PATH_DIR;
}
const char *menu_entry_pathdir_get_value(uint32_t i)
void menu_entry_pathdir_get_value(uint32_t i, char *s, size_t len)
{
rarch_setting_t *setting = menu_entry_get_setting(i);
return setting->value.string;
menu_entry_t entry;
menu_entry_get(&entry, i, NULL, true);
strlcpy(s, entry.value, len);
}
void menu_entry_pathdir_set_value(uint32_t i, const char *s)
@ -195,10 +196,11 @@ void menu_entry_pathdir_set_value(uint32_t i, const char *s)
setting_set_with_string_representation(setting, s);
}
const char *menu_entry_pathdir_extensions(uint32_t i)
void menu_entry_pathdir_extensions(uint32_t i, char *s, size_t len)
{
rarch_setting_t *setting = menu_entry_get_setting(i);
return setting->values;
if (setting)
strlcpy(s, setting->values, len);
}
void menu_entry_reset(uint32_t i)

View File

@ -77,11 +77,11 @@ uint32_t menu_entry_pathdir_allow_empty(uint32_t i);
uint32_t menu_entry_pathdir_for_directory(uint32_t i);
const char *menu_entry_pathdir_get_value(uint32_t i);
void menu_entry_pathdir_get_value(uint32_t i, char *s, size_t len);
void menu_entry_pathdir_set_value(uint32_t i, const char *s);
const char *menu_entry_pathdir_extensions(uint32_t i);
void menu_entry_pathdir_extensions(uint32_t i, char *s, size_t len);
void menu_entry_reset(uint32_t i);