Try opening the file path directly before hitting the asset system.
authorSam Lantinga <slouken@libsdl.org>
Fri, 02 Nov 2012 00:35:48 -0700
changeset 66298e2c731103e6
parent 6628 7994e6979876
child 6630 55910871076b
Try opening the file path directly before hitting the asset system.
src/file/SDL_rwops.c
     1.1 --- a/src/file/SDL_rwops.c	Thu Nov 01 19:08:12 2012 -0700
     1.2 +++ b/src/file/SDL_rwops.c	Fri Nov 02 00:35:48 2012 -0700
     1.3 @@ -427,6 +427,17 @@
     1.4          return NULL;
     1.5      }
     1.6  #if defined(ANDROID)
     1.7 +#ifdef HAVE_STDIO_H
     1.8 +    /* Try to open the file on the filesystem first */
     1.9 +    {
    1.10 +        FILE *fp = fopen(file, mode);
    1.11 +        if (fp) {
    1.12 +            return SDL_RWFromFP(fp, 1);
    1.13 +        }
    1.14 +    }
    1.15 +#endif
    1.16 +
    1.17 +    /* Try to open the file from the asset system */
    1.18      rwops = SDL_AllocRW();
    1.19      if (!rwops)
    1.20          return NULL;            /* SDL_SetError already setup by SDL_AllocRW() */