1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-01-30 11:52:11 +01:00

[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.
This commit is contained in:
Connor Abbott 2021-07-02 14:28:57 +02:00 committed by Philip Rebohle
parent b9135ca0cd
commit 2988875e93
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99

View File

@ -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;
}