mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-01 14:58:14 +00: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:
1 parent
f6676fd706
commit
42ae18eea5
8 files changed
+90
-11
No files matched your search
@@ -33,6 +33,10 @@
|
||||
#include "Core/FileLoaders/DiskCachingFileLoader.h"
|
||||
#include "Core/System.h"
|
||||
|
||||
#if PPSSPP_PLATFORM(UWP)
|
||||
#include <fileapifromapp.h>
|
||||
#endif
|
||||
|
||||
#if PPSSPP_PLATFORM(SWITCH)
|
||||
// Far from optimal, but I guess it works...
|
||||
#define fseeko fseek
|
||||
@@ -827,7 +831,11 @@ void DiskCachingFileLoaderCache::GarbageCollectCacheFiles(u64 goalBytes) {
|
||||
|
||||
#ifdef _WIN32
|
||||
const std::wstring w32path = file.fullName.ToWString();
|
||||
#if PPSSPP_PLATFORM(UWP)
|
||||
bool success = DeleteFileFromAppW(w32path.c_str()) != 0;
|
||||
#else
|
||||
bool success = DeleteFileW(w32path.c_str()) != 0;
|
||||
#endif
|
||||
#else
|
||||
bool success = unlink(file.fullName.c_str()) == 0;
|
||||
#endif
|
||||
|
||||
Reference in new issue
Block a user