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

Commit

Permalink
Add a dummy function if SDL doesn't have STDIO support
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Dec 15, 2009
1 parent d9c34d8 commit aed543c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
3 changes: 3 additions & 0 deletions include/SDL_rwops.h
Expand Up @@ -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);
Expand Down
7 changes: 7 additions & 0 deletions src/file/SDL_rwops.c
Expand Up @@ -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 *
Expand Down

0 comments on commit aed543c

Please sign in to comment.