From 08b4974d3348d893c8ea270a7724ec696ae71333 Mon Sep 17 00:00:00 2001 From: Tim <15017472+doodlum@users.noreply.github.com> Date: Sat, 8 Mar 2025 16:58:06 +0000 Subject: [PATCH] chore: remove tearing flag from proxy --- src/DX12SwapChain.cpp | 4 ++-- src/Hooks.cpp | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/DX12SwapChain.cpp b/src/DX12SwapChain.cpp index 585f52cc6d..65045f2acd 100644 --- a/src/DX12SwapChain.cpp +++ b/src/DX12SwapChain.cpp @@ -111,7 +111,7 @@ HRESULT DX12SwapChain::GetBuffer(void** ppSurface) return S_OK; } -HRESULT DX12SwapChain::Present(UINT, UINT Flags) +HRESULT DX12SwapChain::Present(UINT SyncInterval, UINT Flags) { // Wait for D3D11 to finish DX::ThrowIfFailed(d3d11Context->Signal(d3d11Fence.get(), fenceValue)); @@ -153,7 +153,7 @@ HRESULT DX12SwapChain::Present(UINT, UINT Flags) commandQueue->ExecuteCommandLists(1, commandListsToExecute); // Present the frame - DX::ThrowIfFailed(swapChain->Present(0, Flags | DXGI_PRESENT_ALLOW_TEARING)); + DX::ThrowIfFailed(swapChain->Present(SyncInterval, Flags)); // Wait for D3D12 to finish DX::ThrowIfFailed(commandQueue->Signal(d3d12Fence.get(), fenceValue)); diff --git a/src/Hooks.cpp b/src/Hooks.cpp index 12ecfe031e..cfe26fd5ed 100644 --- a/src/Hooks.cpp +++ b/src/Hooks.cpp @@ -208,6 +208,9 @@ struct IDXGISwapChain_Present state->Reset(); menu->DrawOverlay(); + if (upscaling->d3d12Interop) + SyncInterval = 0; + BOOL fullscreen = FALSE; ((IDXGISwapChain*)This)->GetFullscreenState(&fullscreen, nullptr); if (fullscreen || SyncInterval) {