Skip to content
This repository has been archived by the owner. It is now read-only.
Browse files

Try opening the file path directly before hitting the asset system.

  • Loading branch information
slouken committed Nov 2, 2012
1 parent c711b2a commit d3748b81a9d17d537d7a34cdbef086df7cbcdbba

File 1 of 1 in d3748b8

@@ -427,6 +427,17 @@ SDL_RWFromFile(const char *file, const char *mode)
return NULL;
#if defined(ANDROID)
/* Try to open the file on the filesystem first */
FILE *fp = fopen(file, mode);
if (fp) {
return SDL_RWFromFP(fp, 1);

/* Try to open the file from the asset system */
rwops = SDL_AllocRW();
if (!rwops)
return NULL; /* SDL_SetError already setup by SDL_AllocRW() */

0 comments on commit d3748b8

Please sign in to comment.