• Advertisement
Sign in to follow this  

querying the user for a display mode

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

I recently refactored my 2D directx 9 game so that it is resolution independent. It now loads the artwork at very high res and knows how to scale/crop/letterbox to any screen size desired. The application now supports any resolution at any aspect ratio as long the resolution's wd and hgt values are greater than or equal to 800x600. I'm now working on an options menu that allows the user to select a display mode and had a couple of questions about doing this:

(1) First of all, am I doing the enumeration right? For fullscreen modes I'm using EnumAdapterModes() to get all of the display modes for adapter D3DADAPTER_DEFAULT and d3d format D3DFMT_X8R8G8B8. Do I need to worry about adapters besides D3DADAPTER_DEFAULT? Should I let the user select an adapter in options? Do I need to enumerate other display modes besides D3DFMT_X8R8G8B8?

(2) Should I let the user select the refresh rate value for a given screen resolution? Or is that too fine-grained of control?

(3) For windowed modes I was just going to let them pick from an assortment of wd and hgt values for the window such that wd and hgt are bigger than or equal to 800x600 but smaller than or equal to their current screen mode's values. Is that reasonable?

Share this post


Link to post
Share on other sites
Advertisement
(2) Look at how other games handle that. Usually they can select the refresh rate too. Just enum all stuff into one list. I would only enumerate D3DFMT_X8R8G8B8 modes. Maybe I'm wrong about this one. If you want it to be selectable, it is usually a different widget.

I use EnumDisplayDevices and EnumDisplaySettings.
Maybe EnumAdapterModes() is a directx thing?

Share this post


Link to post
Share on other sites
Even most commercial games support only the default adapter. If you fell you have time left let the user select the adapter but there is only a very small number of people with more than one adapter in their system.
If you use only D3DFMT_X8R8G8B8 for you front buffer you don’t need to care about other formats.
Letting the user select the refresh rate is an advanced option. If you still want this option thing about an advanced option dialog/tab. It may confuse a regular player to much.
Present some common resolution for window mode should be fine. Again if you fell to do something more you can offer free configuration in an advanced dialog/tab.

Share this post


Link to post
Share on other sites
Quote:
Original post by Demirug
Letting the user select the refresh rate is an advanced option. If you still want this option thing about an advanced option dialog/tab. It may confuse a regular player to much.


Yeah, I think I'll expose refresh rate in an advanced settings menu for the selected resolution. But which refresh rate should I select for a given resolution by default? -- the highest?


Share this post


Link to post
Share on other sites
You can use zero. This way the runtime will select one for you in the following order:
Refresh rate of the latest desktop mode, if supported by the device.
75 hertz if supported by the device.
60 hertz if supported by the device.
Device default.

Share this post


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

  • Advertisement