Annoying problem

Started by
2 comments, last by ColdfireV 22 years, 3 months ago
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
[email=jperegrine@customcall.com]ColdfireV[/email]
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.


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.
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
[email=jperegrine@customcall.com]ColdfireV[/email]

This topic is closed to new replies.

Advertisement