Jump to content
  • Advertisement
Sign in to follow this  
Eitsch

Get Supported Resolutions

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

how do i get all supported resolutions of the client machine? i need it for my settings application. it should work on mac and windows and i don't want to try all resolutions to get the supported ones (some displays have strange resolutions like 1440x900 and such stuff). i know that a gl call will not work but is there a glut routine? thanks

Share this post


Link to post
Share on other sites
Advertisement
Have a look at:

EnumDisplaySettings

The EnumDisplaySettings function obtains information about one of a display device's graphics modes. You can obtain information for all of a display device's graphics modes by making a series of calls to this function.

BOOL EnumDisplaySettings(
LPCTSTR lpszDeviceName, // specifies the display device
DWORD iModeNum, // specifies the graphics mode
LPDEVMODE lpDevMode // points to structure to receive settings
);

Hope this helps you a bit.

greetz,

Ward

Share this post


Link to post
Share on other sites
No. There's no cross platform way to pull this off without maybe using an external library (I can't think of anything relevant in SDL though).

Share this post


Link to post
Share on other sites
so the only way to get it on all plattforms is (the dirty one) to test every resolution and look if the resolution change was successfully.
ok thanks

Share this post


Link to post
Share on other sites
Quote:
Original post by Eitsch
so the only way to get it on all plattforms is (the dirty one) to test every resolution and look if the resolution change was successfully.

Not really. The proper way to do it is by using platform dependent code to query the available resolutions.

Share this post


Link to post
Share on other sites
Quote:
Original post by Eitsch
so the only way to get it on all plattforms is (the dirty one) to test every resolution and look if the resolution change was successfully.
ok thanks


Since the method of changing resolutions is platform-dependent, it makes sense that the method of enumerating those resolutions would also be platform-dependent.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • 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!