I'm trying to port an emulator. I have it rendering fine in its own window, but SDL is completely ignoring the SDL_WINDOWID env. variable and I was wondering if anyone had any input. As best as I can tell I'm doing it correctly. The code is as follows:
sprintf(buf, "SDL_WINDOWID=%d", hWndMain);
Where hWndMain is the primary app window. A little bit later on I make a call to SDL_SetVideoMode and it pops up its own window. A call to 'getenv' shows that its setting the value correctly and pulling it back just fine. I've tried 'putenv', '_putenv', and the win32 call 'SetEnvironmentVariable' to no avail. I've tried in just about every place I can think to do it and it doesn't work. I googled a night away and asked around wherever I could find but no one can seem to help me. For the record, the app has its own WinMain and I dont _have_ to link against 'SDL_main.lib'.
I'm running WinXP with no SP's, SDL 1.2.8 and VS.NET 2003. It appears to have worked correctly in older versions of SDL but, I dunno.