mirror of
https://gitlab.com/Mr_Goldberg/goldberg_emulator.git
synced 2024-11-14 10:50:13 +01:00
Enable DX12 overlay
This commit is contained in:
parent
c667dbd3af
commit
982ec56007
1 changed files with 6 additions and 3 deletions
|
@ -87,7 +87,10 @@ HRESULT STDMETHODCALLTYPE Renderer_Detector::MyIDXGISwapChain_Present(IDXGISwapC
|
|||
if (!inst.stop_retry())
|
||||
{
|
||||
IUnknown* pDevice = nullptr;
|
||||
_this->GetDevice(IID_PPV_ARGS(reinterpret_cast<ID3D10Device**>(&pDevice)));
|
||||
if (inst._dx12_hooked)
|
||||
{
|
||||
_this->GetDevice(IID_PPV_ARGS(reinterpret_cast<ID3D12Device**>(&pDevice)));
|
||||
}
|
||||
if (pDevice)
|
||||
{
|
||||
DX10_Hook::Inst()->start_hook();
|
||||
|
@ -436,13 +439,13 @@ void Renderer_Detector::hook_dx12()
|
|||
}//if (pDevice != nullptr)
|
||||
}//if (D3D12CreateDevice != nullptr)
|
||||
}//if (library != nullptr)
|
||||
if (pCommandQueue != nullptr && pCommandList != nullptr && pSwapChain != nullptr)
|
||||
if (pCommandQueue != nullptr && pSwapChain != nullptr)
|
||||
{
|
||||
PRINT_DEBUG("Hooked IDXGISwapChain::Present to detect DX Version\n");
|
||||
|
||||
_dx12_hooked = true;
|
||||
auto h = DX12_Hook::Inst();
|
||||
h->loadFunctions(pCommandQueue, pCommandList, pSwapChain);
|
||||
h->loadFunctions(pCommandQueue, pSwapChain);
|
||||
Hook_Manager::Inst().AddHook(h);
|
||||
HookDXGIPresent(pSwapChain);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue