Skip to main content
gamedev.net
🔒 Locked

pause in CD3DApplication

Started by tscott1213 2 replies 350+ views
Original Post
tscott1213
tscott1213
Evening all. I am working through microsoft's CD3DApplication class and don't understand some of the reasons for the calls to Pause(). For example, while in HandlePossibleSizeChange() (which deals with a window'd D3D app being resized) they call pause() just before reseting the 3D environment. Isn't the application effectively paused() until this procedure relinquish control to the message pump? Thanks for the help. Todd
hplus0603
hplus0603
While re-sizing windows, Windows will call the window message proc directly, without queuing messages through the pump.
enum Bool { True, False, FileNotFound };
tscott1213
tscott1213
I definately was not aware of that.

Thanks for the help, I would have never figured that out on my own.

Todd
tscott1213
tscott1213
The more I think about this the more concerned I become.

Pausing the game loop doesn't seem to be enough of a failsafe. For example, if I have a Key combination setup to alternate between full-screen and windowed mode couldn't windows trigger a switch while I am in the middle of resetting devices? So, the program could be reloading video resources in one function and calling reset in another?

Am I thinking about this correctly?

Can someone recommend a good tutorial/tech doc that explains this and maybe other common windows messaging quirks?

Thanks
Todd

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.