From 05f3fa09b396a6b0c81ffdaf6e11d02ca8899c4e Mon Sep 17 00:00:00 2001 From: Nemirtingas Date: Fri, 16 Aug 2019 18:29:49 +0200 Subject: [PATCH] Better compatibility for DX10 & DX11 Create a NULL Device (We only need it to retrieve its vtable) --- overlay_experimental/DX10_Hook.cpp | 2 +- overlay_experimental/DX11_Hook.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/overlay_experimental/DX10_Hook.cpp b/overlay_experimental/DX10_Hook.cpp index 4fdc2742..90dbff6e 100644 --- a/overlay_experimental/DX10_Hook.cpp +++ b/overlay_experimental/DX10_Hook.cpp @@ -35,7 +35,7 @@ void DX10_Hook::start_hook() SwapChainDesc.SampleDesc.Quality = 0; SwapChainDesc.Windowed = TRUE; - D3D10CreateDeviceAndSwapChain(NULL, D3D10_DRIVER_TYPE_HARDWARE, NULL, 0, D3D10_SDK_VERSION, &SwapChainDesc, &pSwapChain, &pDevice); + D3D10CreateDeviceAndSwapChain(NULL, D3D10_DRIVER_TYPE_NULL, NULL, 0, D3D10_SDK_VERSION, &SwapChainDesc, &pSwapChain, &pDevice); if (pDevice != nullptr && pSwapChain != nullptr) { diff --git a/overlay_experimental/DX11_Hook.cpp b/overlay_experimental/DX11_Hook.cpp index 41ffd9ca..628ca7a8 100644 --- a/overlay_experimental/DX11_Hook.cpp +++ b/overlay_experimental/DX11_Hook.cpp @@ -45,7 +45,7 @@ void DX11_Hook::start_hook() SwapChainDesc.SampleDesc.Quality = 0; SwapChainDesc.Windowed = TRUE; - D3D11CreateDeviceAndSwapChain(NULL, D3D_DRIVER_TYPE_HARDWARE, NULL, 0, NULL, NULL, D3D11_SDK_VERSION, &SwapChainDesc, &pSwapChain, &pDevice, NULL, NULL); + D3D11CreateDeviceAndSwapChain(NULL, D3D_DRIVER_TYPE_NULL, NULL, 0, NULL, NULL, D3D11_SDK_VERSION, &SwapChainDesc, &pSwapChain, &pDevice, NULL, NULL); if (pDevice != nullptr && pSwapChain != nullptr) {