Too many compatible modes!

Started by blue_tomato, October 04, 2005, 18:03:39

Previous topic - Next topic

blue_tomato

When I run the method

Display.getAvailableDisplayModes();

it returns lots of resolutions my laptop absolutely can not use.

Is there a way to return only the modes physically available to the current display?

Matzon

each display mode is tested against a windows api call to confirm validity...

blue_tomato

Quote from: "Matzon"each display mode is tested against a windows api call to confirm validity...

But I really get a lot of crazy resolutions that can not display on the built in LCD panel.

The thing is, any game I run allows me to choose only from a list of resolutions I can run natively. Is there any other Windows API they are using to validate the resolutions?

I do not want my players to be able to select a resolution that does not work properly in real, and I can not expect them to know which ones work or not themselves...

My LCD screen can maximum use the resolution 1280x768 @ 60Hz, however this is what is reported back:

1920 x 1080 x 16 @100Hz
1280 x 960 x 32 @120Hz
1280 x 960 x 16 @72Hz
1280 x 768 x 16 @75Hz
1280 x 960 x 16 @200Hz
1280 x 768 x 32 @56Hz
1024 x 768 x 16 @75Hz
1280 x 960 x 16 @70Hz
1920 x 1200 x 16 @60Hz
720 x 480 x 16 @60Hz
1856 x 1392 x 32 @75Hz
1280 x 1024 x 32 @85Hz
1920 x 1080 x 16 @75Hz
1920 x 1200 x 32 @75Hz
720 x 480 x 32 @75Hz
1024 x 768 x 32 @60Hz
1856 x 1392 x 16 @60Hz
720 x 576 x 32 @100Hz
1280 x 768 x 32 @60Hz
1200 x 900 x 32 @75Hz
1920 x 1200 x 16 @100Hz
720 x 480 x 16 @100Hz
1920 x 1080 x 32 @60Hz
1800 x 1440 x 32 @70Hz
1680 x 1050 x 32 @100Hz
1680 x 1050 x 32 @60Hz
1600 x 1200 x 32 @70Hz
1360 x 768 x 32 @85Hz
1280 x 1024 x 32 @100Hz
2048 x 1536 x 32 @66Hz
1152 x 864 x 32 @100Hz
1024 x 768 x 16 @90Hz
1280 x 1024 x 16 @90Hz
2048 x 1536 x 16 @75Hz
1856 x 1392 x 32 @90Hz
1280 x 720 x 32 @60Hz
1152 x 864 x 16 @60Hz
640 x 480 x 32 @90Hz
1360 x 768 x 32 @60Hz
1280 x 1024 x 16 @180Hz
320 x 200 x 16 @60Hz
800 x 600 x 16 @160Hz
720 x 480 x 32 @90Hz
1360 x 1020 x 32 @100Hz
1920 x 1440 x 32 @85Hz
1520 x 1140 x 16 @100Hz
640 x 480 x 16 @60Hz
1280 x 720 x 32 @75Hz
1152 x 864 x 16 @75Hz
640 x 480 x 32 @75Hz
1792 x 1344 x 32 @75Hz
640 x 350 x 16 @60Hz
1280 x 720 x 16 @60Hz
1152 x 864 x 32 @60Hz
848 x 480 x 16 @60Hz
1856 x 1392 x 16 @72Hz
2048 x 1536 x 32 @70Hz
1200 x 900 x 32 @60Hz
1200 x 900 x 32 @100Hz
960 x 720 x 32 @100Hz
800 x 600 x 16 @60Hz
800 x 600 x 32 @85Hz
1360 x 1024 x 16 @85Hz
800 x 600 x 32 @75Hz
640 x 480 x 16 @100Hz
1400 x 1050 x 32 @75Hz
720 x 576 x 32 @59Hz
1360 x 1024 x 16 @75Hz
1360 x 1020 x 16 @75Hz
1280 x 960 x 32 @160Hz
1920 x 1080 x 32 @100Hz
320 x 240 x 16 @75Hz
1024 x 768 x 32 @120Hz
1024 x 768 x 16 @72Hz
1920 x 1440 x 16 @75Hz
1024 x 768 x 16 @200Hz
848 x 480 x 32 @60Hz
1280 x 1024 x 16 @70Hz
1680 x 1050 x 32 @75Hz
1360 x 768 x 32 @75Hz
960 x 720 x 16 @60Hz
800 x 600 x 32 @100Hz
960 x 720 x 32 @75Hz
640 x 400 x 16 @60Hz
2048 x 1536 x 16 @60Hz
960 x 720 x 16 @100Hz
800 x 600 x 32 @60Hz
1600 x 1200 x 16 @85Hz
320 x 240 x 32 @60Hz
1520 x 1140 x 32 @100Hz
1792 x 1344 x 32 @85Hz
640 x 350 x 32 @60Hz
1800 x 1440 x 16 @75Hz
1280 x 960 x 32 @85Hz
1792 x 1344 x 32 @100Hz
640 x 480 x 32 @100Hz
800 x 600 x 16 @75Hz
1024 x 768 x 16 @70Hz
1520 x 1140 x 16 @60Hz
1280 x 1024 x 32 @120Hz
1520 x 1140 x 32 @75Hz
1280 x 720 x 16 @85Hz
1152 x 864 x 32 @85Hz
1920 x 1200 x 16 @75Hz
720 x 480 x 16 @75Hz
720 x 480 x 32 @72Hz
1024 x 768 x 32 @200Hz
800 x 600 x 32 @200Hz
800 x 600 x 32 @72Hz
800 x 600 x 16 @120Hz
1920 x 1440 x 16 @60Hz
1920 x 1200 x 32 @60Hz
720 x 480 x 32 @60Hz
720 x 576 x 32 @75Hz
720 x 576 x 16 @60Hz
1024 x 768 x 16 @60Hz
640 x 480 x 16 @90Hz
2048 x 1536 x 32 @60Hz
2048 x 1536 x 16 @85Hz
1920 x 1440 x 32 @75Hz
1856 x 1392 x 16 @75Hz
1024 x 768 x 32 @75Hz
1920 x 1080 x 16 @120Hz
640 x 480 x 16 @160Hz
1280 x 800 x 16 @60Hz
720 x 576 x 16 @100Hz
1024 x 768 x 32 @100Hz
1856 x 1392 x 32 @100Hz
400 x 300 x 32 @75Hz
1600 x 1200 x 16 @120Hz
1280 x 768 x 16 @85Hz
320 x 200 x 32 @75Hz
1680 x 1050 x 16 @75Hz
1280 x 720 x 16 @75Hz
1152 x 864 x 32 @75Hz
1680 x 1050 x 32 @85Hz
800 x 600 x 16 @90Hz
1360 x 1020 x 32 @60Hz
1200 x 900 x 16 @100Hz
1792 x 1344 x 16 @90Hz
720 x 480 x 16 @30Hz
1280 x 1024 x 16 @85Hz
1920 x 1080 x 32 @120Hz
640 x 480 x 32 @160Hz
1024 x 768 x 32 @85Hz
1360 x 1020 x 16 @100Hz
800 x 600 x 32 @70Hz
400 x 300 x 32 @60Hz
800 x 600 x 16 @200Hz
800 x 600 x 32 @120Hz
800 x 600 x 16 @72Hz
2048 x 1536 x 16 @66Hz
1280 x 1024 x 16 @75Hz
800 x 600 x 32 @90Hz
720 x 576 x 16 @75Hz
720 x 576 x 32 @60Hz
2048 x 1536 x 16 @70Hz
1280 x 1024 x 32 @60Hz
800 x 600 x 32 @160Hz
1920 x 1200 x 16 @85Hz
1920 x 1080 x 32 @85Hz
720 x 480 x 16 @85Hz
1520 x 1140 x 16 @75Hz
1800 x 1440 x 16 @60Hz
1600 x 1200 x 16 @100Hz
1920 x 1080 x 16 @30Hz
1856 x 1392 x 32 @72Hz
1800 x 1440 x 32 @75Hz
640 x 480 x 32 @120Hz
640 x 480 x 16 @72Hz
1280 x 1024 x 16 @100Hz
1600 x 1200 x 32 @75Hz
1792 x 1344 x 16 @75Hz
1600 x 1200 x 32 @120Hz
720 x 480 x 16 @59Hz
1280 x 960 x 32 @100Hz
1152 x 864 x 16 @70Hz
1024 x 768 x 32 @150Hz
800 x 600 x 16 @70Hz
1360 x 1020 x 32 @75Hz
1280 x 1024 x 32 @70Hz
1280 x 1024 x 16 @160Hz
1856 x 1392 x 32 @60Hz
1280 x 1024 x 32 @75Hz
1280 x 768 x 32 @75Hz
640 x 400 x 32 @60Hz
1024 x 768 x 32 @70Hz
400 x 300 x 16 @60Hz
1280 x 768 x 16 @60Hz
1280 x 960 x 16 @75Hz
720 x 480 x 32 @30Hz
960 x 720 x 32 @60Hz
800 x 600 x 16 @100Hz
1200 x 900 x 16 @75Hz
1920 x 1440 x 16 @85Hz
960 x 720 x 16 @75Hz
720 x 480 x 16 @72Hz
640 x 480 x 16 @85Hz
1680 x 1050 x 16 @60Hz
1600 x 1200 x 16 @70Hz
1360 x 1024 x 32 @85Hz
1280 x 960 x 32 @72Hz
1280 x 960 x 16 @120Hz
1680 x 1050 x 16 @85Hz
1280 x 960 x 32 @200Hz
1280 x 768 x 16 @56Hz
1280 x 960 x 32 @70Hz
1400 x 1050 x 16 @100Hz
1280 x 1024 x 16 @120Hz
640 x 480 x 16 @200Hz
1360 x 768 x 16 @60Hz
1280 x 720 x 32 @85Hz
1152 x 864 x 16 @85Hz
2048 x 1536 x 32 @75Hz
1360 x 768 x 16 @85Hz
1800 x 1440 x 16 @100Hz
1600 x 1200 x 16 @60Hz
1024 x 768 x 16 @160Hz
1920 x 1080 x 16 @85Hz
1800 x 1440 x 32 @60Hz
1600 x 1200 x 32 @100Hz
1024 x 768 x 32 @72Hz
1024 x 768 x 16 @120Hz
640 x 480 x 32 @85Hz
1280 x 960 x 32 @60Hz
1280 x 768 x 32 @85Hz
512 x 384 x 16 @60Hz
1200 x 900 x 16 @60Hz
1360 x 1024 x 32 @75Hz
1800 x 1440 x 32 @100Hz
1600 x 1200 x 32 @60Hz
640 x 480 x 16 @75Hz
1400 x 1050 x 16 @75Hz
1280 x 960 x 32 @75Hz
1800 x 1440 x 16 @90Hz
1280 x 960 x 16 @60Hz
800 x 600 x 16 @85Hz
1360 x 1024 x 16 @60Hz
1856 x 1392 x 16 @90Hz
1024 x 768 x 32 @90Hz
1600 x 1200 x 16 @75Hz
2048 x 1536 x 32 @85Hz
1280 x 1024 x 32 @90Hz
1280 x 960 x 16 @100Hz
1920 x 1440 x 32 @60Hz
1024 x 768 x 32 @160Hz
1360 x 1020 x 16 @60Hz
1400 x 1050 x 32 @100Hz
1792 x 1344 x 16 @85Hz
1856 x 1392 x 16 @100Hz
1400 x 1050 x 32 @60Hz
1920 x 1440 x 16 @90Hz
1792 x 1344 x 32 @90Hz
1280 x 800 x 32 @60Hz
1360 x 1024 x 32 @60Hz
512 x 384 x 32 @75Hz
1280 x 1024 x 32 @160Hz
1792 x 1344 x 16 @60Hz
1600 x 1024 x 16 @60Hz
1152 x 864 x 32 @70Hz
1024 x 768 x 16 @150Hz
720 x 576 x 16 @59Hz
1280 x 960 x 16 @85Hz
512 x 384 x 32 @60Hz
320 x 240 x 32 @75Hz
512 x 384 x 16 @75Hz
1280 x 1024 x 16 @60Hz
400 x 300 x 16 @75Hz
1360 x 768 x 16 @75Hz
640 x 480 x 32 @72Hz
640 x 480 x 16 @120Hz
1800 x 1440 x 32 @90Hz
720 x 480 x 32 @59Hz
640 x 480 x 32 @200Hz
1280 x 960 x 16 @160Hz
320 x 240 x 16 @60Hz
1920 x 1200 x 32 @100Hz
720 x 480 x 32 @100Hz
1024 x 768 x 16 @85Hz
1920 x 1080 x 16 @60Hz
320 x 200 x 16 @75Hz
1400 x 1050 x 16 @60Hz
1920 x 1080 x 32 @30Hz
1520 x 1140 x 32 @60Hz
1792 x 1344 x 16 @100Hz
1024 x 768 x 16 @100Hz
1152 x 864 x 16 @100Hz
720 x 480 x 16 @90Hz
1920 x 1080 x 32 @75Hz
1792 x 1344 x 32 @60Hz
1600 x 1024 x 32 @60Hz
1920 x 1200 x 32 @85Hz
720 x 480 x 32 @85Hz
1920 x 1440 x 32 @90Hz
1800 x 1440 x 16 @70Hz
1680 x 1050 x 16 @100Hz
1280 x 1024 x 32 @180Hz
320 x 200 x 32 @60Hz
1600 x 1200 x 32 @85Hz
640 x 480 x 32 @60Hz

Matzon

for each located display mode we do:
ChangeDisplaySettings(&DevMode, CDS_FULLSCREEN | CDS_TEST) == DISP_CHANGE_SUCCESSFUL


This is the docs for that api call:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/devcons_7gz7.asp
QuoteSpecifying CDS_TEST allows an application to determine which graphics modes are actually valid, without causing the system to change to that graphics mode.

To the best of my knowledge, that would indicate that your graphics drivers or monitor profile is reporting something it can't do. I cannot see how we can fix that.

Fool Running

Check to see if you can select the resolutions in the display properties (whether or not they actually work when selected).  That would tell you that it is a Driver problem and not a LWJGL problem.
On my computer I have to explicitly installl the drivers supplied by my monitor comany; Windows detects the wrong supported resolutions through plug and play. My guess this is a pretty common problem (I could be wrong :lol: ) so I think a timout period (select "yes" to keep the new res) might be needed.
Programmers will, one day, rule the world... and the world won't notice until its too late.Just testing the marquee option ;D

blue_tomato

Quote from: "Fool Running"Check to see if you can select the resolutions in the display properties (whether or not they actually work when selected).  That would tell you that it is a Driver problem and not a LWJGL problem.
On my computer I have to explicitly installl the drivers supplied by my monitor comany; Windows detects the wrong supported resolutions through plug and play. My guess this is a pretty common problem (I could be wrong :lol: ) so I think a timout period (select "yes" to keep the new res) might be needed.
You are right, I am allowed to select many resolutions that is not supported natively under display properties. If I do, I am given a virtual desktop, where I can scroll around using the mouse.

However, what is a bit confusing is all games I run only provides me a list of resolutions that can be run natively in full-screen mode. So, there should be some API call that can verify this somewhere which they use?

Matzon

theoretically - you could sort out all displaymodes that are bigger than current displaymode ?

gimbal

Are you sure those games aren't just providing a list of modes that are almost certainly supported?

Me, I just filter out any resolution other than 800*600, 1024*768, 1280*960, 1280*1024 and 1600*1200. Maybe I'll add some laptop/mac specific resolutions in the future... When filtering the modes to the standard ones you won't have the problem of unsupported modes showing up.

blue_tomato

Quote from: "gimbal"Are you sure those games aren't just providing a list of modes that are almost certainly supported?

Me, I just filter out any resolution other than 800*600, 1024*768, 1280*960, 1280*1024 and 1600*1200. Maybe I'll add some laptop/mac specific resolutions in the future... When filtering the modes to the standard ones you won't have the problem of unsupported modes showing up.

Yes, you are right, my bad.

After closer inspection, it is clear to me the games I mentioned must have an internal list of resolutions they support, and then matches them against what is found reported from the graphics driver.

So, to put it short, they are cheating. It is probably the best way though...

How do you select the right refresh rate then?

Evil-Devil

Have you set the checkbox in your display settings for only displaying the usable resolutions? In my display settings I can check that box and then only the resolutions my screen can display will be listed, else there will be all that my radeon can do...some more than my 17" TFT can ;)