Created
January 16, 2022 19:23
-
-
Save Wowfunhappy/ea9cc5461c9712d34da57975b8c91294 to your computer and use it in GitHub Desktop.
Get Refresh Rate
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CGDirectDisplayID displays; | |
uint32_t matchingDisplayCount = 1; | |
CGGetDisplaysWithRect([[NSApp mainWindow]frame], 1, &displays, &matchingDisplayCount); | |
double realRefreshRate = CGDisplayModeGetRefreshRate(CGDisplayCopyDisplayMode(displays)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment