mirror of
https://github.com/izzy2lost/ppsspp.git
synced 2026-03-10 12:43:04 -07:00
Replace Win32 file IO with UWP safe variants and add support for getting drives to UWP build (#15652)
* replace, all win32 file io with their matching uwp safe variants * add support for drive listing * Delete NATIVEAPP.ipch * Update .gitignore * fix indentation
This commit is contained in:
@@ -38,6 +38,9 @@
|
||||
#ifdef _WIN32
|
||||
#include "Common/CommonWindows.h"
|
||||
#include <sys/stat.h>
|
||||
#if PPSSPP_PLATFORM(UWP)
|
||||
#include <fileapifromapp.h>
|
||||
#endif
|
||||
#else
|
||||
#include <dirent.h>
|
||||
#include <unistd.h>
|
||||
@@ -673,8 +676,11 @@ std::vector<PSPFileInfo> VirtualDiscFileSystem::GetDirListing(std::string path)
|
||||
|
||||
std::wstring w32path = GetLocalPath(path).ToWString() + L"\\*.*";
|
||||
|
||||
#if PPSSPP_PLATFORM(UWP)
|
||||
hFind = FindFirstFileExFromAppW(w32path.c_str(), FindExInfoStandard, &findData, FindExSearchNameMatch, NULL, 0);
|
||||
#else
|
||||
hFind = FindFirstFileEx(w32path.c_str(), FindExInfoStandard, &findData, FindExSearchNameMatch, NULL, 0);
|
||||
|
||||
#endif
|
||||
if (hFind == INVALID_HANDLE_VALUE) {
|
||||
return myVector; //the empty list
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user