Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting Refresh Rate of a Monitor



On Jan 20, 2006, at 1:20 PM, Gerry Beggs wrote:

Hi.
I'm trying to let the user select which monitor to display my application in full-screen.
I'd like to be able to display to the user the characteristics of the display such as resolution, pixel depth, refresh rate, etc.


I can get all the information I need through a GDHandle except the refresh rate.

How does would I get the refresh rate of a monitor given it's GDHandle?

it's much easier if you could use the CGDirectDisplay API.

CGDisplayCurrentMode()

then CFDictionaryGetValue() with the key "RefreshRate".

if you really need to go through GDHandle, the field you need is called csRefreshRate, but you may need to use Fix2Long to convert to a long... and you would need to do a list iterator proc to iterate the mode list through DMGetIndexedDisplayModeFromList(), which is really painful (especially if you want to be 9 and X compatible, like I did in 10.1.4 days)...

pete
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/carbon-dev/email@hidden

This email sent to email@hidden
References: 
 >Getting Refresh Rate of a Monitor (From: Gerry Beggs <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.