[SDL] Problem with SDL_RWFromFile
Ryan C. Gordon
icculus at clutteredmind.org
Mon Sep 8 03:21:02 PDT 2003
> However, I presume that the #ifdef would be taking care of the problem.
Mostly, it's avoiding the problem.
The problem is that ANSI C file streams can't be passed to a DLL in
Windows (different address space? Different C library? Each DLL gets it's
own set of file handles? I don't know the actual technical reason, beyond
"it doesn't work").
You can aim for a lower level and create a RWops that does all it's file
i/o through the win32 API directly. Arguably, this should be in SDL, but
it's not something anyone has bothered to do at this point.
PhysicsFS does this and has an RWops wrapper, but it might be overkill for
what you are doing (http://icculus.org/physfs/)
--ryan.
More information about the SDL
mailing list