SDL/src/video
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
..
android Fixes #2611 #2610, Touch events cause crash on Android, thanks Alvin & Sylvain 2014-06-28 12:36:44 -03:00
cocoa Fixed bug 2696 - Mac: fix display mode refresh rate calculation 2014-08-23 10:47:50 -07:00
directfb Added a README file regarding WinRT support 2014-04-09 21:29:19 -04:00
dummy Added a README file regarding WinRT support 2014-04-09 21:29:19 -04:00
haiku Added a README file regarding WinRT support 2014-04-09 21:29:19 -04:00
mir Fixed bug 2629 - Mac: crash when calling SDL_DestroyWindow with an active OpenGL context 2014-07-07 10:33:32 -07:00
nacl Fix compiler warnings in Native Client and Linux builds. 2014-06-20 11:10:16 -03:00
pandora Added a README file regarding WinRT support 2014-04-09 21:29:19 -04:00
psp Added a README file regarding WinRT support 2014-04-09 21:29:19 -04:00
raspberry Added an API function to warp the mouse cursor in global screen space: SDL_WarpMouseGlobal() 2014-06-04 10:55:26 -07:00
uikit The OpenGL context returned by the UIKit backend is now an actual OpenGL context instead of the OpenGL view we created. 2014-08-06 00:28:02 -07:00
wayland Fixed bug 2629 - Mac: crash when calling SDL_DestroyWindow with an active OpenGL context 2014-07-07 10:33:32 -07:00
windows Fixed bug 2629 - Mac: crash when calling SDL_DestroyWindow with an active OpenGL context 2014-07-07 10:33:32 -07:00
winrt WinRT: fixed the max-button count for WinPhone 8.1 message boxes 2014-05-10 23:39:54 -04:00
x11 Improvements to the IBus related code: 2014-08-19 23:17:28 +01:00
SDL_RLEaccel.c Made the RLE code (semi) readable again 2014-06-25 01:35:17 -07:00
SDL_RLEaccel_c.h Added a README file regarding WinRT support 2014-04-09 21:29:19 -04:00
SDL_blit.c Added a README file regarding WinRT support 2014-04-09 21:29:19 -04:00
SDL_blit.h Fixed bug 2556 - add compilation flag -Wshadow 2014-06-25 00:43:10 -07:00
SDL_blit_0.c Added a README file regarding WinRT support 2014-04-09 21:29:19 -04:00
SDL_blit_1.c Added a README file regarding WinRT support 2014-04-09 21:29:19 -04:00
SDL_blit_A.c Fix compiler warnings in Native Client and Linux builds. 2014-06-20 11:10:16 -03:00
SDL_blit_N.c Added a README file regarding WinRT support 2014-04-09 21:29:19 -04:00
SDL_blit_auto.c Added a README file regarding WinRT support 2014-04-09 21:29:19 -04:00
SDL_blit_auto.h Added a README file regarding WinRT support 2014-04-09 21:29:19 -04:00
SDL_blit_copy.c Added a README file regarding WinRT support 2014-04-09 21:29:19 -04:00
SDL_blit_copy.h Added a README file regarding WinRT support 2014-04-09 21:29:19 -04:00
SDL_blit_slow.c Added a README file regarding WinRT support 2014-04-09 21:29:19 -04:00
SDL_blit_slow.h Added a README file regarding WinRT support 2014-04-09 21:29:19 -04:00
SDL_bmp.c The Gimp puts out a different bogus color mask for 32-bit .bmp files. :) 2014-07-09 00:09:57 -04:00
SDL_clipboard.c Added a README file regarding WinRT support 2014-04-09 21:29:19 -04:00
SDL_egl.c Fixed mingw64 build and warnings 2014-07-07 10:26:28 -07:00
SDL_egl_c.h Added a README file regarding WinRT support 2014-04-09 21:29:19 -04:00
SDL_fillrect.c Added a README file regarding WinRT support 2014-04-09 21:29:19 -04:00
SDL_pixels.c Added NV12 and NV21 texture support for OpenGL and OpenGL ES 2.0 renderers 2014-08-06 11:34:54 -07:00
SDL_pixels_c.h Added a README file regarding WinRT support 2014-04-09 21:29:19 -04:00
SDL_rect.c Added a README file regarding WinRT support 2014-04-09 21:29:19 -04:00
SDL_rect_c.h Added a README file regarding WinRT support 2014-04-09 21:29:19 -04:00
SDL_shape.c Added a README file regarding WinRT support 2014-04-09 21:29:19 -04:00
SDL_shape_internals.h Added a README file regarding WinRT support 2014-04-09 21:29:19 -04:00
SDL_stretch.c Added a README file regarding WinRT support 2014-04-09 21:29:19 -04:00
SDL_surface.c Removed SDL_round() because the license wasn't compatible with zlib 2014-08-17 13:11:55 -07:00
SDL_sysvideo.h SDL - fix re-entrancy into SDL_UpdateFullscreenMode under OSX. During HideWindow we get a RESTORED event which then turns fullscreen back on causing a hang in Cocoa_SetWindowFullscreenSpace waiting for the fullscreen transition to finish. 2014-07-30 17:45:52 -07:00
SDL_video.c SDL - fix re-entrancy into SDL_UpdateFullscreenMode under OSX. During HideWindow we get a RESTORED event which then turns fullscreen back on causing a hang in Cocoa_SetWindowFullscreenSpace waiting for the fullscreen transition to finish. 2014-07-30 17:45:52 -07:00
sdlgenblit.pl Added a README file regarding WinRT support 2014-04-09 21:29:19 -04:00