Jump to content
  • Advertisement

Archived

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

Despotismo

Cosmetical Error While Closing DirectX

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

Does it happens to everybody that when you finish your DirectX application, if run from the Visual Studio Interface, then it appears with the size reduced, and, if you are using any pop-up programs (ie ICQ), it also appears with the size reduced? It seems that the programs adjust their size to the DirectX resolution used in the game. Has anyone managed to solve this problem? Despotismo AKA Javier Otaegui Sabarasa Entertainment www.sabarasa.com.ar

Share this post


Link to post
Share on other sites
Advertisement
Yup, happens to me too. I haven''t found a solutin for ICQ other than just putting it in the left corner intead, but you can just de-maximize the VStudio window and stretch it to full screen by hand and it works just fine^^



-Deku-chan

DK Art (my site, which has little programming-related stuff on it, but you should go anyway^_^)

"I'm dropping like flies!" - me, playing Super Smash Bros. (and losing)
"What fun!" - me, playing Super Smash Bros. (and beating the crap out of somebody)

Share this post


Link to post
Share on other sites
That''s true, but it''s not so elegant. The problem is that when common users of the game play it, everything must be fine, and I should leave the programs in the desktop exactly as I found them.

I think that perhaps by inverting something in the closing sequence of the game, this can be worked around.

Despotismo AKA Javier Otaegui
Sabarasa Entertainment
www.sabarasa.com.ar

Share this post


Link to post
Share on other sites
I don''t think there is any way around it, you just have to put up with it. It might help if you used IDirectDraw::RestoreDisplayMode() at the end before you released your DirectDraw object.

------------------------------
#pragma twice


sharewaregames.20m.com

Share this post


Link to post
Share on other sites
quote:
Original post by Quantum

i think the problem happens when the resolution used by the game is less than the desktop resolution


Can''t be.
I use 1024x768 all the time (On my desktop and in my apps) and it still happens.



- Goblineye Entertainment
The road to success is always under construction

Share this post


Link to post
Share on other sites
Try calling your shutdown code from within a WM_CLOSE or WM_DESTROY message handler. I''m assuming that you''re shutting down after the message loop exits.

Share this post


Link to post
Share on other sites
if you are using exclusive mode, you need to restore normal mode before destroying your ddraw object.

    
pDD->SetCooperativeLevel(0, NORMAL); //dunno the excact syntax



rid

Share this post


Link to post
Share on other sites
I am calling the shutdown code from the WM_CLOSE message, and I''m also using RestoreDisplayMode(), but it doesn''t seems to work. I''ve inserted the SetCooperativeLevel(hwnd,DDSCL_NORMAL) code also, but it keeps doing the same.

I think that the problem isn''t in the shutdown of the program, but, instead, it is in the initialization of DirectX. While we are in fullscreen mode, some update messages are thrown to the other apps, and they check, lets say, GetSystemMetrics() or similar, and they resize themselves. There must be some way to solve this.

Despotismo AKA Javier Otaegui
Sabarasa Entertainment
www.sabarasa.com.ar

Share this post


Link to post
Share on other sites
I believe you can safely ignore this. I''m fairly sure that this only happens during debug runs from msvc. If you do a build, close msvc, then run the actual .exe using windows this doesn''t happen.

I''m almost certain anyway

Just because the church was wrong doesn't mean Galileo wasn't a heritic.
It just means he was a heritic who was right.

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!