[SDL] Joystick, Vobration?

Torsten Mohr tmohr at s.netic.de
Sun Sep 25 03:35:01 PDT 2005

> I then tried:

> #include <SDL_getenv.h>
> //....

>        char variable[256];
>        sprintf(variable, "SDL_WINDOWID=0x%lx", winId());
>        if (SDL_putenv(variable) == -1)
>        {
>          // ....
>        }

> However, this leads to many unstable seg faults.

Did you find any bugs in the code itself?  It's possible you're just
using different C runtimes (and associated memory managers)  

> Finally, I hacked 
> SDL_getenv.c so that for visual studio, SDL_putenv and SDL_getenv call 
> ::putenv and ::getenv. This seems to work as they mod the environment 
> block of the sdl dll.

> Is this the best fix? I am new (about 2 days) to SDL so I feel like I am 
> missing something obvious. I can post the mods to the SDL_getenv.{h,c} 
> if it would help.

Sure, go ahead and post them, it can't hurt.

	-Sam Lantinga, Software Engineer, Blizzard Entertainment

More information about the SDL mailing list