Recommended Posts

I am writing an RPG using Visual C++ 6.0 and DirectX 7. It''s a tile-based game running in 320x240x16. A friend of mine downloaded a brief demo from my site, and while most people have said it runs fine, he had a problem with it... he can no longer change his resolution or color depth! He''s not stuck in 320x240x16. When the game ended, it switched back to his normal resolution and color depth (I think 1024x768x32) like it should have. However, if he goes into his desktop properties and tries to change the resolution, it says something about the device not being able to do it. He tried running another fullscreen DirectX game that was supposed to run in 800x600, only it couldn''t change the resolution either, so it ended up displaying in the upper-left corner of the display.
I am totally at a loss as to why this would have occurred. When the game runs, it creates a log file reporting the success or failure of all its initialization stuff, and I could find no evidence of any runtime errors in the log. All the DirectX objects I created were released when the game ended... Does anyone know how I can fix this problem my friend is having? Thanks...
-Ironblayde
Aeon Software

Share this post

Link to post

Share on other sites

I don''t think that''s it... my WindowProc() is very minimal as to what it handles. It only takes action on three messages, and in each case, simply returns 0. There are no logic errors in the switch() statement that handles these three messages. Everything else goes to DefWindowProc(), and returns the value that DefWindowProc() returns. Is there anything else that could be causing this?

Share this post

Link to post

Share on other sites

Well, a few things. First, I don''t even know what part of the code I''d show you; there''s a LOT of it. But anyway, just now I was talking to the person (Michael) whose machine did this. A few days ago, I had written up a program that does nothing but initialize DirectDraw, set fullscreen cooperation, test a bunch of resolutions, report the results, and shut down. I had been sending it to people whose video cards wouldn''t set the 320x240x16 mode in the first place, just to see what the results would be. Anyway, I sent the program to Michael because I was wondering if it would be able to set the resolution or not. It wasn''t. Every call failed. But after the program ended, he could change his resolution again! He ran the resolution test again, and every call succeeded!

Now the error is gone, and I have no idea where it came from, much less how it was alleviated. I was also thinking that perhaps it wasn''t related to my demo after all, since like you said, nobody else has experienced this problem, and the log didn''t report any errors. But if it was caused by my code somehow, I''d sure like to know where it came from.