Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions OptiScaler/hooks/HooksDx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -280,8 +280,8 @@ static HRESULT Present(IDXGISwapChain* pSwapChain, UINT SyncInterval, UINT Flags
return presentResult;
}

//if (State::Instance().activeFgType == OptiFG && State::Instance().currentFG != nullptr)
// State::Instance().currentFG->CallbackMutex.lock();
// if (State::Instance().activeFgType == OptiFG && State::Instance().currentFG != nullptr)
// State::Instance().currentFG->CallbackMutex.lock();

if (State::Instance().activeFgType != OptiFG && !(Flags & DXGI_PRESENT_TEST || Flags & DXGI_PRESENT_RESTART))
{
Expand All @@ -299,7 +299,7 @@ static HRESULT Present(IDXGISwapChain* pSwapChain, UINT SyncInterval, UINT Flags

// Removing might cause issues, saved almost 1 ms
// if (hWnd != Util::GetProcessWindow())
//{
// {
// if (pPresentParameters == nullptr)
// presentResult = pSwapChain->Present(SyncInterval, Flags);
// else
Expand All @@ -311,7 +311,7 @@ static HRESULT Present(IDXGISwapChain* pSwapChain, UINT SyncInterval, UINT Flags
// LOG_ERROR("2 {:X}", (UINT)presentResult);

// return presentResult;
//}
// }

ID3D12CommandQueue* cq = nullptr;
ID3D11Device* device = nullptr;
Expand Down Expand Up @@ -449,8 +449,8 @@ static HRESULT Present(IDXGISwapChain* pSwapChain, UINT SyncInterval, UINT Flags
else
LOG_ERROR("3 {:X}", (UINT) presentResult);

//if (State::Instance().activeFgType == OptiFG && State::Instance().currentFG != nullptr)
// State::Instance().currentFG->CallbackMutex.unlock();
// if (State::Instance().activeFgType == OptiFG && State::Instance().currentFG != nullptr)
// State::Instance().currentFG->CallbackMutex.unlock();

return presentResult;
}
Expand Down Expand Up @@ -505,8 +505,8 @@ static HRESULT Present(IDXGISwapChain* pSwapChain, UINT SyncInterval, UINT Flags
fg->FgDone();
}

//if (State::Instance().activeFgType == OptiFG && State::Instance().currentFG != nullptr)
// State::Instance().currentFG->CallbackMutex.unlock();
// if (State::Instance().activeFgType == OptiFG && State::Instance().currentFG != nullptr)
// State::Instance().currentFG->CallbackMutex.unlock();

return presentResult;
}
Expand Down