• Advertisement
Sign in to follow this  

SDL_WINDOWID win32 broken?

This topic is 4583 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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: <code> char buf[100]; sprintf(buf, "SDL_WINDOWID=%d", hWndMain); _putenv(buf); if(SDL_Init(SDL_INIT_VIDEO)<0) { exit(0); } </code> 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.

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement