Jump to content
  • Advertisement
Sign in to follow this  
Claudio

Refresh Rate Monitor

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

Hi. I use DirectX 9. My problem is: how can I get the refreshrate of the both two monitor ? that are connected to the computer ? I use "GetAdapterDisplayMode": - for the primary monitor:
     D3D->GetAdapterDisplayMode(D3DADAPTER_DEFAULT, &D3DDisplayMode);

- for the secondary monitor ? what has to be the first input of the function "GetAdapterDisplayMode" ?

Share this post


Link to post
Share on other sites
Advertisement
If the monitors are on different adapters, then yes - just specify the adapter index instead of D3DADAPTER_DEFAULT. If both monitors appear as the same adapter, I don't think there's any way to do it - there doesn't seem to be any way to do it with GDI either.

Why do you need that information though? There's almost nothing you can do with it.

EDIT: The first parameter is the adapter index:
Quote:
Parameters

Adapter
[in] Ordinal number that denotes the display adapter to query. D3DADAPTER_DEFAULT is always the primary display adapter.
I.e. 0, 1, 2, etc

Share this post


Link to post
Share on other sites
Quote:
Original post by Evil Steve
If the monitors are on different adapters, then yes - just specify the adapter index instead of D3DADAPTER_DEFAULT. If both monitors appear as the same adapter, I don't think there's any way to do it - there doesn't seem to be any way to do it with GDI either.

Why do you need that information though? There's almost nothing you can do with it.


Hi.

Thanks.

The refresh rate of the monitor is used to display a text, only for a determinate period of time.

Share this post


Link to post
Share on other sites
Quote:
Original post by Claudio
The refresh rate of the monitor is used to display a text, only for a determinate period of time.
Then use a timer, not the monitor refresh rate - what if the user has V-sync disabled in their display driver?

Share this post


Link to post
Share on other sites
Quote:
Original post by Evil Steve
If both monitors appear as the same adapter, I don't think there's any way to do it - there doesn't seem to be any way to do it with GDI either.

EnumDisplayDevices and EnumDisplaySettings?
Quote:
EnumDisplayDevices
To query all display devices in the current session, call this function in a loop, starting with iDevNum set to 0, and incrementing iDevNum until the function fails. To select all display devices in the desktop, use only the display devices that have the DISPLAY_DEVICE_ATTACHED_TO_DESKTOP flag in the DISPLAY_DEVICE structure.

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!