Question about SDL_RWops

i am using an object API with Stream.
i want to use them and try to create my own
SDL_RWops * SDL_RWFromStream(Stream *) function.

as it is a mix of C and an other language i experiment problems to debug.
Anyway i try to load and display an image with it.
i call IMG_Load_RW(SDL_RWops *, int) with my custom SDL_RWops and 0 or 1
as freesrc args.
It seems to perform well until after close, after which the method
doesnt return but raise an exception.

the console tell me it is a SEHexception ??
any idea …

i alloc the SDL_RWops with
SDL_AllocRW and, after, i set seek, read, write, close field to point to
my methods.
i never set any specific value for the type field. maybe it is the
reason, but i have no idea of the value i should set…

i alloc the SDL_RWops with
SDL_AllocRW and, after, i set seek, read, write, close field to point to
my methods.
i never set any specific value for the type field. maybe it is the
reason, but i have no idea of the value i should set…

Source code is more descriptive.

Look at $/SDL12/src/file/SDL_rwops.c for examples of implementing an
SDL_RWops.

–ryan.

Source code is more descriptive.

thanks, yes i begin to dig this way…