Last active
March 18, 2019 17:29
-
-
Save Riesi/09babd6f06908dbe48ff114bdbbee39b to your computer and use it in GitHub Desktop.
Potential Reshade fix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/d3d11/d3d11_main.cpp b/src/d3d11/d3d11_main.cpp | |
index 4ab16ca..f5a2a4b 100644 | |
--- a/src/d3d11/d3d11_main.cpp | |
+++ b/src/d3d11/d3d11_main.cpp | |
@@ -97,8 +97,7 @@ extern "C" { | |
} | |
} | |
- | |
- DLLEXPORT HRESULT __stdcall D3D11CreateDevice( | |
+ static HRESULT D3D11CreateDevice_w( | |
IDXGIAdapter* pAdapter, | |
D3D_DRIVER_TYPE DriverType, | |
HMODULE Software, | |
@@ -178,6 +177,22 @@ extern "C" { | |
return S_OK; | |
} | |
+ DLLEXPORT HRESULT __stdcall D3D11CreateDevice( | |
+ IDXGIAdapter* pAdapter, | |
+ D3D_DRIVER_TYPE DriverType, | |
+ HMODULE Software, | |
+ UINT Flags, | |
+ const D3D_FEATURE_LEVEL* pFeatureLevels, | |
+ UINT FeatureLevels, | |
+ UINT SDKVersion, | |
+ ID3D11Device** ppDevice, | |
+ D3D_FEATURE_LEVEL* pFeatureLevel, | |
+ ID3D11DeviceContext** ppImmediateContext) { | |
+ | |
+ return D3D11CreateDevice_w(pAdapter, DriverType, | |
+ Software, Flags, pFeatureLevels, FeatureLevels, | |
+ SDKVersion, ppDevice, pFeatureLevel, ppImmediateContext); | |
+} | |
DLLEXPORT HRESULT __stdcall D3D11CreateDeviceAndSwapChain( | |
IDXGIAdapter* pAdapter, | |
@@ -203,7 +218,7 @@ extern "C" { | |
return E_INVALIDARG; | |
// Try to create a device first. | |
- HRESULT status = D3D11CreateDevice(pAdapter, DriverType, | |
+ HRESULT status = D3D11CreateDevice_w(pAdapter, DriverType, | |
Software, Flags, pFeatureLevels, FeatureLevels, | |
SDKVersion, &d3d11Device, pFeatureLevel, &d3d11Context); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment