dwmapi: Fill qpcVBlank in DwmGetCompositionTimingInfo().
This commit is contained in:
parent
09cafcc3b6
commit
62fa96df16
1 changed files with 4 additions and 1 deletions
|
@ -235,7 +235,7 @@ static int get_display_frequency(void)
|
|||
*/
|
||||
HRESULT WINAPI DwmGetCompositionTimingInfo(HWND hwnd, DWM_TIMING_INFO *info)
|
||||
{
|
||||
LARGE_INTEGER performance_frequency;
|
||||
LARGE_INTEGER performance_frequency, qpc;
|
||||
static int i, display_frequency;
|
||||
|
||||
if (!info)
|
||||
|
@ -258,6 +258,9 @@ HRESULT WINAPI DwmGetCompositionTimingInfo(HWND hwnd, DWM_TIMING_INFO *info)
|
|||
QueryPerformanceFrequency(&performance_frequency);
|
||||
info->qpcRefreshPeriod = performance_frequency.QuadPart / display_frequency;
|
||||
|
||||
QueryPerformanceCounter(&qpc);
|
||||
info->qpcVBlank = (qpc.QuadPart / info->qpcRefreshPeriod) * info->qpcRefreshPeriod;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue