1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-02-20 10:54:16 +01:00

[dxgi] Handle DXGI_PRESENT_TEST and failures in GetFrameStatistics

This commit is contained in:
Joshua Ashton 2021-05-20 22:35:38 +01:00 committed by Joshie
parent 401edc53fe
commit c51080068e

View File

@ -265,8 +265,10 @@ namespace dxvk {
std::lock_guard<std::mutex> lockBuf(m_lockBuffer);
try {
m_presentCount++;
return m_presenter->Present(SyncInterval, PresentFlags, nullptr);
HRESULT hr = m_presenter->Present(SyncInterval, PresentFlags, nullptr);
if (hr == S_OK && !(PresentFlags & DXGI_PRESENT_TEST))
m_presentCount++;
return hr;
} catch (const DxvkError& err) {
Logger::err(err.message());
return DXGI_ERROR_DRIVER_INTERNAL_ERROR;