Implement mode 11

This commit is contained in:
Xele02
2012-12-29 23:55:34 +01:00
parent 1d9f27f3e3
commit 45c9ed389c
2 changed files with 83 additions and 2 deletions

View File

@@ -541,7 +541,23 @@ std::vector<PSPFileInfo> DirectoryFileSystem::GetDirListing(std::string path) {
break;
}
#else
ERROR_LOG(HLE, "GetDirListing not implemented on non-Windows");
DIR *dp;
dirent *dirp;
if((dp = opendir(GetLocalPath(path).c_str())) == NULL) {
ERROR_LOG(HLE,"Error opening directory %s\n",path.c_str());
return myVector;
}
while ((dirp = readdir(dp)) != NULL) {
PSPFileInfo entry;
if(dirp->d_type == DT_DIR)
entry.type = FILETYPE_DIRECTORY;
else
entry.type = FILETYPE_NORMAL;
entry.name = dirp->d_name;
myVector.push_back(entry);
}
closedir(dp);
#endif
return myVector;
}