From 2988875e93e7e5396c54777a33a2658afe04731a Mon Sep 17 00:00:00 2001 From: Connor Abbott <cwabbott0@gmail.com> Date: Fri, 2 Jul 2021 14:28:57 +0200 Subject: [PATCH] [dxgi] Call QueryPerformanceCounter directly dxvk::high_resolution_clock is meant to be a wrapper around the C++ time library, and getCounter() is (AFAIK) an internal thing so calling it directly is odd. On winelib this redirects to the host's implementation, which means this fails to compile. Since this is a Windows API and not for internal usage just call the Windows API function directly. --- src/dxgi/dxgi_swapchain.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dxgi/dxgi_swapchain.cpp b/src/dxgi/dxgi_swapchain.cpp index fd41ad399..78d8ae581 100644 --- a/src/dxgi/dxgi_swapchain.cpp +++ b/src/dxgi/dxgi_swapchain.cpp @@ -179,7 +179,7 @@ namespace dxvk { pStats->PresentCount = m_presentCount; pStats->PresentRefreshCount = 0; pStats->SyncRefreshCount = 0; - pStats->SyncQPCTime.QuadPart = dxvk::high_resolution_clock::getCounter(); + QueryPerformanceCounter(&pStats->SyncQPCTime); pStats->SyncGPUTime.QuadPart = 0; return S_OK; }