Try opening the file path directly before hitting the asset system.
This commit is contained in:
parent
68ee3bad84
commit
1f23677ce4
1 changed files with 11 additions and 0 deletions
|
@ -427,6 +427,17 @@ SDL_RWFromFile(const char *file, const char *mode)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
#if defined(ANDROID)
|
#if defined(ANDROID)
|
||||||
|
#ifdef HAVE_STDIO_H
|
||||||
|
/* Try to open the file on the filesystem first */
|
||||||
|
{
|
||||||
|
FILE *fp = fopen(file, mode);
|
||||||
|
if (fp) {
|
||||||
|
return SDL_RWFromFP(fp, 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Try to open the file from the asset system */
|
||||||
rwops = SDL_AllocRW();
|
rwops = SDL_AllocRW();
|
||||||
if (!rwops)
|
if (!rwops)
|
||||||
return NULL; /* SDL_SetError already setup by SDL_AllocRW() */
|
return NULL; /* SDL_SetError already setup by SDL_AllocRW() */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue