Jump to content
  • Advertisement
Sign in to follow this  
The C modest god

Critical section, directX

This topic is 4766 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Advertisement
Given, to my knowledge, the ALT-TAB event is delivered through your message pump you probably don't have to worry about task switching during initial loading/resource creation.

On a per-frame basis you must handle Alt-Tab properly, it's considered bad practice to try and block such task-switching mechanisms. To quote the official DirectX FAQ:
Quote:
How do I disable ALT+TAB and other task switching?
You don't!


hth
Jack

Share this post


Link to post
Share on other sites
The problem is when I create Direct3DDevice, because if the program switches during the constructor of the Object containing the Direct3DDevice, then I loose the device but I still dont have all the information of the Object and the restore mechanisem.

Share this post


Link to post
Share on other sites
I don't think you read Jeff's post.. if someone alt+tabs while the D3D Device is being created, the switch won't happen until your message loop runs for the first time, which is after the device has been created. If you've created a fullscreen device, you'll have to reset the device when you get focus back.

Share this post


Link to post
Share on other sites
Quote:
Original post by Drakex
I don't think you read Jeff's post.. if someone alt+tabs while the D3D Device is being created, the switch won't happen until your message loop runs for the first time, which is after the device has been created. If you've created a fullscreen device, you'll have to reset the device when you get focus back.

Ok, you are right.
Thanks.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!