SDL program creating 2 windows

Started by
1 comment, last by flodywan 13 years, 4 months ago
Hey guys. I'm making a simple program, but it's creating 2 windows. One of the windows is the exe window, and the other is called SDL_app. I'm not sure why it's creating 2.

Also, I can't close out of the SDL_app, I can only close the program if I close the exe window.

Any ideas why it's doing this?
Advertisement
What IDE are you using? What language?

If we assume the most common configuration then it's visual c++ 2008/2010 by Microsoft.

If you right click your project in the solution explorer and select properties, then you will bring up the Property window. On the left hand side click on Linker->System. In the subsystem field to the right, you can select such things as 'Console (/SUBSYSTEM:CONSOLE)' or 'Windows (/SUBSYSTEM:WINDOWS)'.

You prolly have the former activated; if you change it to the latter then you should only open one window. The former option will additionally open a console window in addition to your SDL app. This can be useful, however; you may write debug info, etc. to this as yr program runs.

The above assumes MSVC++ 2008. You didn't say what you're using so I typed in what I was using.

Quote:Also, I can't close out of the SDL_app, I can only close the program if I close the exe window.


Are you handling the SDL_QUIT event?

Something like:

while( SDL_PollEvent( &event ) ){	if( event.type == SDL_QUIT ) 	{ 		// Quit the program                 // ...	}}


?

If you are not handling this then that is your problem, otherwise please say more.
Thanks a lot! You were right in all your assumptions, and they fixed the problems!

This topic is closed to new replies.

Advertisement