daily pastebin goal
81%
SHARE
TWEET

Untitled

a guest Mar 23rd, 2019 41 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. diff --git a/src/d3d11/d3d11_main.cpp b/src/d3d11/d3d11_main.cpp
  2. index 4ab16ca..f5a2a4b 100644
  3. --- a/src/d3d11/d3d11_main.cpp
  4. +++ b/src/d3d11/d3d11_main.cpp
  5. @@ -97,8 +97,7 @@ extern "C" {
  6.      }
  7.    }
  8.    
  9. -  
  10. -  DLLEXPORT HRESULT __stdcall D3D11CreateDevice(
  11. +  static HRESULT D3D11CreateDevice_w(
  12.            IDXGIAdapter*         pAdapter,
  13.            D3D_DRIVER_TYPE       DriverType,
  14.            HMODULE               Software,
  15. @@ -178,6 +177,22 @@ extern "C" {
  16.      return S_OK;
  17.    }
  18.    
  19. +    DLLEXPORT HRESULT __stdcall D3D11CreateDevice(
  20. +          IDXGIAdapter*         pAdapter,
  21. +          D3D_DRIVER_TYPE       DriverType,
  22. +          HMODULE               Software,
  23. +          UINT                  Flags,
  24. +    const D3D_FEATURE_LEVEL*    pFeatureLevels,
  25. +          UINT                  FeatureLevels,
  26. +          UINT                  SDKVersion,
  27. +          ID3D11Device**        ppDevice,
  28. +          D3D_FEATURE_LEVEL*    pFeatureLevel,
  29. +          ID3D11DeviceContext** ppImmediateContext) {
  30. +
  31. +    return D3D11CreateDevice_w(pAdapter, DriverType,
  32. +      Software, Flags, pFeatureLevels, FeatureLevels,
  33. +      SDKVersion, ppDevice, pFeatureLevel, ppImmediateContext);
  34. +}
  35.    
  36.    DLLEXPORT HRESULT __stdcall D3D11CreateDeviceAndSwapChain(
  37.            IDXGIAdapter*         pAdapter,
  38. @@ -203,7 +218,7 @@ extern "C" {
  39.        return E_INVALIDARG;
  40.      
  41.      // Try to create a device first.
  42. -    HRESULT status = D3D11CreateDevice(pAdapter, DriverType,
  43. +    HRESULT status = D3D11CreateDevice_w(pAdapter, DriverType,
  44.        Software, Flags, pFeatureLevels, FeatureLevels,
  45.        SDKVersion, &d3d11Device, pFeatureLevel, &d3d11Context);
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top