|
@@ -270,25 +270,25 @@ char *FiosBrowseTo(const FiosItem *item)
|
|
|
|
|
|
case FIOS_TYPE_OLD_SCENARIO:
|
|
|
sprintf(str_buffr, "%s/%s.%s", path, item->name, _old_extensions[item->old_extension]);
|
|
|
return str_buffr;
|
|
|
}
|
|
|
|
|
|
return NULL;
|
|
|
}
|
|
|
|
|
|
// Get descriptive texts.
|
|
|
// Returns a path as well as a
|
|
|
// string describing the path.
|
|
|
StringID FiosGetDescText(char **path)
|
|
|
StringID FiosGetDescText(const char **path)
|
|
|
{
|
|
|
*path = _fios_path[0] ? _fios_path : "/";
|
|
|
|
|
|
#if defined(__linux__)
|
|
|
{
|
|
|
struct statvfs s;
|
|
|
|
|
|
if (statvfs(*path, &s) == 0)
|
|
|
{
|
|
|
uint64 tot = (uint64)s.f_bsize * s.f_bavail;
|
|
|
SET_DPARAM32(0, (uint32)(tot >> 20));
|
|
|
return STR_4005_BYTES_FREE;
|
|
@@ -351,25 +351,25 @@ const DriverDesc _music_driver_descs[] =
|
|
|
#endif
|
|
|
{ "null", "Null Music Driver", &_null_music_driver, 1},
|
|
|
{ NULL, NULL, NULL, 0}
|
|
|
};
|
|
|
|
|
|
bool FileExists(const char *filename)
|
|
|
{
|
|
|
return access(filename, 0) == 0;
|
|
|
}
|
|
|
|
|
|
static int LanguageCompareFunc(const void *a, const void *b)
|
|
|
{
|
|
|
return strcmp(*(char**)a, *(char**)b);
|
|
|
return strcmp(*(const char* const *)a, *(const char* const *)b);
|
|
|
}
|
|
|
|
|
|
int GetLanguageList(char **languages, int max)
|
|
|
{
|
|
|
DIR *dir;
|
|
|
struct dirent *dirent;
|
|
|
int num = 0;
|
|
|
|
|
|
dir = opendir(_path.lang_dir);
|
|
|
if (dir != NULL) {
|
|
|
while ((dirent = readdir(dir))) {
|
|
|
char *t = strrchr(dirent->d_name, '.');
|