Sign in to follow this  
AmeNeko

SDL_WINDOWID win32 broken?

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this