|
Size: 1221
Comment: minor change
|
Size: 1350
Comment: update content - changeset 4636
|
| Deletions are marked like this. | Additions are marked like this. |
| Line 12: | Line 12: |
| #ifdef HAVE_STDIO_H | |
| Line 13: | Line 14: |
| SDL_bool autoclose) #else SDL_RWops* SDL_RWFromFP(void* fp, |
|
| Line 21: | Line 25: |
| *Returns a pointer to a new RWops structure, or NULL if it fails. * | *<<BR>>Returns a pointer to a new RWops structure, or NULL if it fails. <<BR>>* |
| Line 37: | Line 41: |
| *This is not available under Win32, since files opened in an application on that platform cannot be used by a dynamically linked library.* | *<<BR>>This is not available under Win32, since files opened in an application on that platform cannot be used by a dynamically linked library.<<BR>>* |
| Line 42: | Line 46: |
| .[[SDL_RWFromFile]] *??? .[[SDL_RWFromMem]] *??? |
.[[SDL_RWFromFile]] * .[[SDL_RWFromMem]] * |
DRAFT |
SDL_RWFromFP
Use this function to create an SDL_RWops structure from a standard I/O file pointer.
Contents
Syntax
#ifdef HAVE_STDIO_H
SDL_RWops* SDL_RWFromFP(FILE* fp,
SDL_bool autoclose)
#else
SDL_RWops* SDL_RWFromFP(void* fp,
SDL_bool autoclose)
Function Parameters
fp |
a pointer to the file to open (in the structure ???) |
autoclose |
non-0 to autoclose or 0 to leave the file open when the structure is closed ??? |
Return Value
*
Returns a pointer to a new RWops structure, or NULL if it fails.
*
Code Examples
FILE *fp;
SDL_RWops *rw;
fp = fopen("myfile.dat", "rb");
rw = SDL_RWFromFP(fp, 1);
// Do things with rw...
SDL_RWclose(rw); // Automatically does an fclose(fp)
Remarks
*
This is not available under Win32, since files opened in an application on that platform cannot be used by a dynamically linked library.
*
Related Functions
SDL_RWclose (Macro) ???
