mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-13 14:30:27 +02:00
UWP Improved Support
This commit is contained in:
1 parent
d43331e2c9
commit
d0b6935592
49 files changed
+4812
-76
No files matched your search
@@ -41,6 +41,10 @@
|
||||
#include <sys/stat.h>
|
||||
#if PPSSPP_PLATFORM(UWP)
|
||||
#include <fileapifromapp.h>
|
||||
#if !defined(__LIBRETRO__)
|
||||
#include "UWP/UWPHelpers/StorageManager.h"
|
||||
#include "UWP/UWPHelpers/PPSSPPTypesHelpers.h"
|
||||
#endif
|
||||
#endif
|
||||
#else
|
||||
#include <dirent.h>
|
||||
@@ -684,6 +688,40 @@ std::vector<PSPFileInfo> VirtualDiscFileSystem::GetDirListing(const std::string
|
||||
hFind = FindFirstFileEx(w32path.c_str(), FindExInfoStandard, &findData, FindExSearchNameMatch, NULL, 0);
|
||||
#endif
|
||||
if (hFind == INVALID_HANDLE_VALUE) {
|
||||
#if PPSSPP_PLATFORM(UWP) && !defined(__LIBRETRO__)
|
||||
// Getting folder contents will need extra work
|
||||
// request must be done within StorageManager
|
||||
auto contents = GetFolderContents(w32path);
|
||||
if (!contents.empty()) {
|
||||
//Copy files data from 'files' to 'myVector'
|
||||
for each (auto item in contents) {
|
||||
PSPFileInfo entry;
|
||||
if (item.isDirectory) {
|
||||
entry.type = FILETYPE_DIRECTORY;
|
||||
}
|
||||
else {
|
||||
entry.type = FILETYPE_NORMAL;
|
||||
}
|
||||
|
||||
entry.access = 0555;
|
||||
entry.exists = true;
|
||||
entry.size = item.size;
|
||||
entry.name = item.name;
|
||||
//tmFromFiletime(entry.atime, file.atime); //find solution if this value is important
|
||||
//tmFromFiletime(entry.ctime, file.ctime); //find solution if this value is important
|
||||
//tmFromFiletime(entry.mtime, file.mtime); //find solution if this value is important
|
||||
entry.isOnSectorSystem = true;
|
||||
|
||||
std::string fullRelativePath = path + "/" + entry.name;
|
||||
int fileIndex = getFileListIndex(fullRelativePath);
|
||||
if (fileIndex != -1)
|
||||
entry.startSector = fileList[fileIndex].firstBlock;
|
||||
|
||||
myVector.push_back(entry);
|
||||
}
|
||||
return myVector;
|
||||
}
|
||||
#endif
|
||||
if (exists)
|
||||
*exists = false;
|
||||
return myVector; //the empty list
|
||||
|
||||
Reference in new issue
Block a user