fix: fall back on dirent filename when all route fails on Android
This commit is contained in:
parent
5398b8c9b0
commit
44d1cc3e4a
|
|
@ -473,7 +473,9 @@ FILE *android_fopen(const char *fileName, const char *mode)
|
||||||
{
|
{
|
||||||
#undef fopen
|
#undef fopen
|
||||||
// Just do a regular open if file is not found in the assets
|
// Just do a regular open if file is not found in the assets
|
||||||
return fopen(TextFormat("%s/%s", internalDataPath, fileName), mode);
|
if(fopen(TextFormat("%s/%s", internalDataPath, fileName), mode) == NULL) {
|
||||||
|
return fopen(fileName, mode);
|
||||||
|
}
|
||||||
#define fopen(name, mode) android_fopen(name, mode)
|
#define fopen(name, mode) android_fopen(name, mode)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user