mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
VFS: Support local paths on Windows too.
This fixes cases where local paths are read from, but not within the registered VFS paths. For example, save state icons.
This commit is contained in:
parent
ef566a3adf
commit
5451334b38
1 changed files with 6 additions and 3 deletions
|
@ -1,6 +1,7 @@
|
|||
#include <stdio.h>
|
||||
#include <set>
|
||||
#include <algorithm>
|
||||
#include <ctype.h>
|
||||
#include <set>
|
||||
#include <stdio.h>
|
||||
|
||||
#ifdef USING_QT_UI
|
||||
#include <QFileInfo>
|
||||
|
@ -332,7 +333,9 @@ void VFSShutdown() {
|
|||
}
|
||||
|
||||
uint8_t *VFSReadFile(const char *filename, size_t *size) {
|
||||
if (filename[0] == '/') {
|
||||
bool isUnixLocal = filename[0] == '/';
|
||||
bool isWindowsLocal = isalpha(filename[0]) && filename[1] == ':' && (filename[2] == '/' || filename[2] == '\\');
|
||||
if (isUnixLocal || isWindowsLocal) {
|
||||
// Local path, not VFS.
|
||||
ILOG("Not a VFS path: %s . Reading local file.", filename);
|
||||
return ReadLocalFile(filename, size);
|
||||
|
|
Loading…
Add table
Reference in a new issue