Add a dummy function if SDL doesn't have STDIO support
--HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404313
This commit is contained in:
parent
db04a493f2
commit
9f5a112e87
2 changed files with 10 additions and 0 deletions
|
@ -131,6 +131,9 @@ extern DECLSPEC SDL_RWops *SDLCALL SDL_RWFromFile(const char *file,
|
|||
#ifdef HAVE_STDIO_H
|
||||
extern DECLSPEC SDL_RWops *SDLCALL SDL_RWFromFP(FILE * fp,
|
||||
SDL_bool autoclose);
|
||||
#else
|
||||
extern DECLSPEC SDL_RWops *SDLCALL SDL_RWFromFP(void * fp,
|
||||
SDL_bool autoclose);
|
||||
#endif
|
||||
|
||||
extern DECLSPEC SDL_RWops *SDLCALL SDL_RWFromMem(void *mem, int size);
|
||||
|
|
|
@ -497,6 +497,13 @@ SDL_RWFromFP(FILE * fp, SDL_bool autoclose)
|
|||
}
|
||||
return (rwops);
|
||||
}
|
||||
#else
|
||||
SDL_RWops *
|
||||
SDL_RWFromFP(void * fp, SDL_bool autoclose)
|
||||
{
|
||||
SDL_SetError("SDL not compiled with stdio support");
|
||||
return NULL;
|
||||
}
|
||||
#endif /* HAVE_STDIO_H */
|
||||
|
||||
SDL_RWops *
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue