Advertisement

SDL window will not restore

Started by March 17, 2005 11:58 AM
0 comments, last by okonomiyaki 19 years, 11 months ago
I've added code to detect when the window lost focus (was minimized), so that I could pause the program and resume when it was restored. Debugging through it, it works fine when minimized. However, I cannot restore the window! Clicking on it doesn't do anything, and when I right-click the icon in the windows bar "restore" is grayed out. When I comment out this code, it restores fine. How come this code stops it from restoring? I was sure that I don't have to handle anything else in the event.

			case SDL_ACTIVEEVENT:
				if(event.active.state & SDL_APPACTIVE) {
					if(event.active.gain)
						gKernel->resume();
					else
						gKernel->pause();
				}
				break;
Ah, stupid me. I was pausing the whole program, including the input manager which pumps the SDL events. Thanks anyway!

This topic is closed to new replies.

Advertisement