SDL_RWFromMem
Name
SDL_RWFromMem -- prepares a memory area for use with RWops.
Synopsis
#include "SDL.h" SDL_RWops *SDL_RWFromMem(void *mem, int size);
Description
SDL_RWFromMem sets up a RWops struct based on a chunk of memory of a certain size.
Note: If the memory is not writable, use SDL_RWFromConstMem instead.
Return Value
Returns pointer to a new RWops struct, or NULL if it fails.
Example
char bitmap[310000]; SDL_RWops *rw; rw = SDL_RWFromMem(bitmap, sizeof(bitmap)); SDL_SaveBMP_RW(screen, rw, 0);
