Use this function to create an SDL_RWops structure from a standard I/O file pointer (stdio.h's
void * fp, SDL_RWops* SDL_RWFromFP( SDL_bool autoclose);
Returns a pointer to the SDL_RWops structure that is created, or NULL on failure; call SDL_GetError() for more information.
This function is not available on Windows, since files opened in an application on that platform cannot be used by a dynamically linked library.
On some platforms, the first parameter is a
void*, on others, it's a
FILE*, depending on what system headers are available to SDL. It is always intended to be the
FILE* type from the C runtime's stdio.h.
This function is available since SDL 2.0.0.