Skip to content

Commit

Permalink
CreateDirect3D11DeviceFromDXGIDevice
Browse files Browse the repository at this point in the history
  • Loading branch information
HIllya51 authored and mingkuang-Chuyu committed Feb 2, 2025
1 parent bea035b commit d975dd5
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions src/Thunks/d3d11.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,28 @@ namespace YY::Thunks
return E_NOINTERFACE;
}
#endif

#if (YY_Thunks_Target <= __WindowsNT6_1)
struct IDXGIDevice;
struct IInspectable;

__DEFINE_THUNK(
d3d11,
8,
HRESULT,
WINAPI,
CreateDirect3D11DeviceFromDXGIDevice,
_In_opt_ IDXGIDevice *dxgiDevice,
_COM_Outptr_ IInspectable **graphicsDevice)
{
if (const auto _pfnCreateDirect3D11DeviceFromDXGIDevice = try_get_CreateDirect3D11DeviceFromDXGIDevice())
{
return _pfnCreateDirect3D11DeviceFromDXGIDevice(dxgiDevice, graphicsDevice);
}
if (graphicsDevice)
*graphicsDevice = nullptr;

return E_NOINTERFACE;
}
#endif
}

0 comments on commit d975dd5

Please sign in to comment.