|
-
April 19th, 2003, 06:57 AM
#1
Probems with changing resolition
I cant seem to find any solution to this, so any help is *greatly* appreciated! I have programmed a game, and as the game starts it tries to change the screen resolution, to avoid the desktop icons to be messed up, the change is not broadcast, it never leaves the "test" state. Something like this:
DevM.dmPelsWidth = 640
DevM.dmPelsHeight = 480
DevM.dmBitsPerPel = Bits '(can be 4, 8, 16, 24, 32)
ChangeDisplaySettings(DevM, CDS_TEST)
On 90% of the target computers, this works perfectly, on the remaining 10% (Seemingly a lot of GeForce users) this messes up, the resolution gets much smaller than the specified one and the controls seems to contain their original states..
ANYONE?? :-)
-
April 19th, 2003, 07:51 PM
#2
Welcome to windows 
This is what all game programmers have to deal with. There is no one way that will work for everyone. You will have to either design in some alternate functions for troublesome configurations, or test for compatability upon installation, and warn the user.
Have fun...
Please remember to rate the posts and threads that you find useful.
How can something be both new and improved at the same time?
-
August 11th, 2004, 02:40 AM
#3
Hai,
I written like this in vc++, but it shows error on DevM in ChangeDisplaySettings(DevM, CDS_TEST); I don't why? Would You please send a sample code for me, depending upon the width and height how can i set the screen resolution.
Thanks and regards
Snippet:
DEVMODE DevM;
DevM.dmPelsWidth = 640;
DevM.dmPelsHeight = 480;
DevM.dmBitsPerPel = 32;// '(can be 4, 8, 16, 24, 32)
ChangeDisplaySettings(DevM, CDS_TEST);
Last edited by S.DARWIN; August 11th, 2004 at 02:52 AM.
Miles to go before I sleep,
-
August 11th, 2004, 03:41 AM
#4
Hallo FiksVe,
you may try this code from Planet source code
james
-
August 11th, 2004, 06:31 AM
#5
Eh...thanks
This post is over two years old, the game has been commersially released, and has sold about 2000 copies..
Anyway, in case somebody was wondering what my problem was, it was the DPI setting in windows. If the user changes the big fonts setting, the screenmetrics gets all fu*#ed up.
This is probably my last post (I havent posted the last year) as I have migrated all of my development to C/C++. Maybe we see each other some time in a different forum
Cheers,
Fiksve
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|