Skip to content

Using DisplayLink to emulate vsync on OSX

Bastiaan Olij requested to merge github/fork/BastiaanOlij/fix_vsync_osx into master

This should fix #24478 (closed)

Implemented a simple version of the fix SDL did. We create a DisplayLink object which will start a background performance thread. This thread will do a callback right before the display is about the update.

We set a flag in this callback and release a conditional lock that was started right before our buffer swap.

Do note that the DisplayLink sends out its callback based on the main display, in a multiple display setup the sync will be based on the main display only.

Merge request reports