Game Development Community

Change focus on window/application (SDL?)

by dompadidodadollidado · in Technical Issues · 03/02/2008 (4:11 pm) · 0 replies

Hiya!

I'm creating a boot menu for the games my classmates and I've created in Torque 2d.
I use C++ and SDL and use the system() call to run the executables. If I run the program in windowed mode, it all works as expected. I boot another game, it starts up, I can play and when I quit it goes back into the menu. But I have a problem when I init video with SDL_FULLSCREEN parameter.
What happens is when I run another executable it doesn't change focus to the new application. The game starts though, got sound and it receives the input, but I can't jump to it (using alt+tab or similar). I'm stuck in the frozen SDL application until I close the other application.

I found the SetActiveWindow function (http://msdn2.microsoft.com/en-us/library/ms646311(VS.85).aspx) when searching for pointers, but I'm not sure it would help me since it seems that the window is active (receives input). Can't find much else and can't figure it out. Any takers?