SDL/premake/projects
Sam Lantinga 059579e48f 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.
2014-08-23 10:47:50 -07:00
..
accelerometer.lua
checkkeys.lua
fireworks.lua
happy.lua
keyboard.lua
loopwave.lua
mixer.lua
rectangles.lua
SDL2.lua Fixed bug 2696 - Mac: fix display mode refresh rate calculation 2014-08-23 10:47:50 -07:00
SDL2main.lua
SDL2test.lua
testatomic.lua
testaudioinfo.lua
testautomation.lua
testdraw2.lua
testdrawchessboard.lua
testerror.lua
testfile.lua
testfilesystem.lua
testgamecontroller.lua
testgesture.lua
testgl2.lua
testgles.lua
testhaptic.lua
testiconv.lua
testime.lua
testintersection.lua
testjoystick.lua
testkeys.lua
testloadso.lua
testlock.lua
testmessage.lua
testmultiaudio.lua
testnative.lua
testoverlay2.lua
testplatform.lua
testpower.lua
testrelative.lua
testrendercopyex.lua
testrendertarget.lua
testresample.lua
testrumble.lua
testscale.lua
testsem.lua
testshader.lua
testshape.lua
testsprite2.lua
testspriteminimal.lua
teststreaming.lua
testthread.lua
testtimer.lua
testver.lua
testwm2.lua
torturethread.lua
touch.lua