Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Try opening the file path directly before hitting the asset system.
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Nov 2, 2012
1 parent c711b2a commit d3748b8
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/file/SDL_rwops.c
Expand Up @@ -427,6 +427,17 @@ SDL_RWFromFile(const char *file, const char *mode)
return NULL;
}
#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();
if (!rwops)
return NULL; /* SDL_SetError already setup by SDL_AllocRW() */
Expand Down

0 comments on commit d3748b8

Please sign in to comment.