[dxgi] unchain DxgiSwapChain::Present1 and Present

dxgi hooking tools might hook both, eg. https://github.com/SpecialKO/SpecialK/issues/167
This commit is contained in:
Katharine Chui 2024-04-22 14:35:37 +08:00 committed by Philip Rebohle
parent 8ba5256dc7
commit 92a43ebf65
2 changed files with 14 additions and 3 deletions

View File

@ -303,15 +303,22 @@ namespace dxvk {
HRESULT STDMETHODCALLTYPE DxgiSwapChain::Present(UINT SyncInterval, UINT Flags) {
return Present1(SyncInterval, Flags, nullptr);
return PresentBase(SyncInterval, Flags, nullptr);
}
HRESULT STDMETHODCALLTYPE DxgiSwapChain::Present1(
UINT SyncInterval,
UINT PresentFlags,
const DXGI_PRESENT_PARAMETERS* pPresentParameters) {
return PresentBase(SyncInterval, PresentFlags, pPresentParameters);
}
HRESULT STDMETHODCALLTYPE DxgiSwapChain::PresentBase(
UINT SyncInterval,
UINT PresentFlags,
const DXGI_PRESENT_PARAMETERS* pPresentParameters) {
if (SyncInterval > 4)
return DXGI_ERROR_INVALID_CALL;

View File

@ -233,6 +233,10 @@ namespace dxvk {
DXGI_FORMAT Format,
DXGI_COLOR_SPACE_TYPE ColorSpace);
HRESULT STDMETHODCALLTYPE PresentBase(
UINT SyncInterval,
UINT PresentFlags,
const DXGI_PRESENT_PARAMETERS* pPresentParameters);
};
}