We set the CVDisplayLink on macOS to 0 or 120, and get the following. This then clamps maximum refresh to 60Hz on the 120Hz ProMotion display on a MBP M2 Max laptop. How is this not fixed in 4 macOS releases?
CoreVideo: currentVBLDelta returned 200000 for display 1 -- ignoring unreasonable value
CoreVideo: [0x7fe2fb816020] Bad CurrentVBLDelta for display 1 is zero. defaulting to 60Hz.
Thanks for the insightful and interesting comments. In addition to your comments and to avoid any confusion about APIs for display synchronization, I'll leave this here ~
CADisplayLink is the recommended and supported way forward for general purpose synchronization of animated content with the display refresh cycle. CADisplayLink is supported on all Apple platforms including iOS, iPadOS, macOS, tvOS, and visionOS. Any new development should prefer using CADisplayLink over other mechanisms for display refresh synchronization.
CAMetalDisplayLink is a closely related specialized version of CADisplayLink for use with high performance Metal apps. CAMetalDisplayLink is also supported on all Apple platforms and it may be more appropriate to use than CADisplayLink in some cases (though it is not necessary to use CAMetalDisplayLink instead of CADisplayLink in Metal based apps).