Jump to content
  • Advertisement

Archived

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

ColdfireV

Annoying problem

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

I guess this problem is more annoying than anything else.. I'm working on Direct3d and DirectInput in Visual C++, and everything has been working fine for now. But, when I create the DI devices and do my thing with them, when I close out of my program, Visual C++'s window always changes sizes. I'm making my program in 640x480 fullscreen, and that's the size of the VC++ window when my program ends. I mean, my desktop normally runs in 1024x768, and I ususally run VC++ as maximized.. But when my program ends, the actual window resizes itself to 640x480 and it still thinks it's maximized for some reason. It didn't do this problem until I included DInput in my project, and if I uninclude it, the problem stops. I know I'm acquiring and unacquiring/releasing all the resources I'm using for DInput. I just hate it when that dang window is always changing sizes everytime I want to run my program. What gives? Coldfirev Edited by - Coldfirev on December 27, 2001 12:56:50 PM

Share this post


Link to post
Share on other sites
Advertisement
I believe its a DX bug, but you can kinda work around it and fiddle to make it better.

1) Unaquire
2) Release Input
3) Sleep(1000)
4) Close Window

I believe the bug is due to the window closing before DX can finish "cleaning up." So, always make sure you are unaquiring and releasing DX Input first then close window.

But the problem never really goes away. But for me, doing that makes it like happen 1 out of 10 instead of 9 out of 10.


Share this post


Link to post
Share on other sites
Just as a side note, I was having this problem with DirectDraw even before including DirectInput. And also, your Sleep(1000) fix worked for me too. Thanks.

Share this post


Link to post
Share on other sites
Hey, that''s a good explanation for what it is doing. I''ve realized it only happens every-so-often anyway, but I stuck in the Sleep() function to see if it helps. Thanks for the tip.

ColdfireV

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!