Share via

How can I know which window emits the Compositor tick event?

峻魁 张 25 Reputation points
2024-03-12T07:52:29.34+00:00

I have a program that can open multiple windows, and currently, I use DCompositionWaitForCompositorClock to achieve vertical sync refresh rate. However, how can I make multiple windows synchronize at different refresh rates on different monitors? For example, I have two monitors, the primary monitor running at 60Hz and the secondary monitor running at 120Hz. It seems that DCompositionWaitForCompositorClock only emits tick events when my primary monitor refreshes. Is there a function similar to DCompositionWaitForCompositorClock that I can use to obtain tick events for the corresponding monitor on the secondary display?

Windows development | Windows API - Win32
{count} vote

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.