mirror of
https://github.com/encounter/SDL.git
synced 2025-12-12 14:46:19 +00:00
Fixed bug 2696 - Mac: fix display mode refresh rate calculation
Alex Szpakowski SDL's Cocoa backend uses the CGDisplayMode API to get refresh rate information about a display mode, but CGDisplayModeGetRefreshRate will return 0 on most non-CRT monitors. The only way I know of to get correct refresh rate information in OS X is via the CoreVideo DisplayLink API. I have attached a patch which tries to use the CVDisplayLinkGetNominalOutputVideoRefreshPeriod function if CGDisplayModeGetRefreshRate fails, which fixes display mode refresh rate information on the monitors I tested. The CVDisplayLink API requires linking with the CoreVideo framework, and the patch updates the various build files to do so.
This commit is contained in:
@@ -17,6 +17,7 @@ tests on that platform.
|
||||
|
||||
The Mac OS X projects currently have reliance on the following dependencies:
|
||||
|
||||
-CoreVideo.framework
|
||||
-AudioToolbox.framework
|
||||
-AudioUnit.framework
|
||||
-Cocoa.framework
|
||||
|
||||
@@ -213,6 +213,7 @@ SDL_project "SDL2"
|
||||
}
|
||||
SDL_links
|
||||
{
|
||||
"CoreVideo.framework",
|
||||
"AudioToolbox.framework",
|
||||
"AudioUnit.framework",
|
||||
"Cocoa.framework",
|
||||
|
||||
Reference in New Issue
Block a user