Allow Android platforms to read from .apk files via the RWOPS interface.

Fixes Bugzilla #1261.

Thanks to Tim Angus for the patch!
This commit is contained in:
Ryan C. Gordon 2011-07-29 16:51:25 -04:00
parent 58faae483b
commit 247346d526
5 changed files with 276 additions and 2 deletions

View file

@ -82,7 +82,21 @@ typedef struct SDL_RWops
Uint32 type;
union
{
#ifdef __WIN32__
#if defined(ANDROID)
struct
{
void *fileName;
void *fileNameRef;
void *inputStream;
void *inputStreamRef;
void *skipMethod;
void *readableByteChannel;
void *readableByteChannelRef;
void *readMethod;
long position;
int size;
} androidio;
#elif defined(__WIN32__)
struct
{
SDL_bool append;
@ -95,6 +109,7 @@ typedef struct SDL_RWops
} buffer;
} windowsio;
#endif
#ifdef HAVE_STDIO_H
struct
{