Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


detecting resolution changes with DX7

This topic is 6264 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

Hello everybody, My DX7 program does not tolerate resolution changes. ALT+TABing and changing my desktop resolution cause it to crash. I want my program to keep running normally when it's running in a window and the resolution is changed, etc. How could I achieve this? I thought of an [apparently] simple way. When a resolution change occurs, flush all surfaces and DDRAW objects. When a resolution change is over, re-initialize DDRAW and surfaces. The problem I have with this approach is that I couldn't detect the resolution change before it occurs. I tried using the WM_DISPLAYCHANGE message but it didn't work. Once this message is received, the resolution change is already done. At this point, the front buffer cannot be manipulated. Trying to restore it returns DDERR_WRONGMODE. Trying to release it crash my program. How could I detect the resolution change before it occurs? I would like to avoid testing for lost surfaces at every loop, as we know before the fact they are the most likely to occur when the display changes. It doesn't mean I want to avoid testing for lost surfaces at all. I just want to avoid testing for lost surfaces until it really becomes necessary. I will take care later of what happens when multiple concurrent DX programs fight for video hardware in windowed mode. I honestly don't really care about this issue for now. Thanks for your help! Edited by - devious on September 22, 2001 11:17:31 AM

Share this post

Link to post
Share on other sites

  • 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!