Ok. I am writing a plugin for a playstation emulator. The emulator uses DLLs
for plugins. I am using SDL for the joysticks, but seem to have a problem.
Under Linux, my DLL compiles and runs fine. Under Windows, whenever the DLL
calls an SDL fucntion, the emulator crashes. I am not sure why it does this.
I have a question, do I have to use some sort of SDL_main in my application
for the program to run in windows? I know in linux, the SDL_main is not
needed. If I do, how would I use it in a DLL?
Here is a small snippet of my code, all the functions exported functions are
declared with C Linkage:
long DECLSPEC PadInit( long flags )
if( SDL_Init( SDL_INIT_VIDEO | SDL_INIT_JOYSTICK ) == -1 ) // CRASHES
/* Rest of code… */
And on Linux this doesn’t crash, and the plugin works perfectly fine.
Mike S. Codename: Freak901010_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com