mirror of
https://github.com/obsproject/obs-studio.git
synced 2024-06-27 23:23:32 +00:00
libobs-winrt: Remove interop code now provided by Windows SDK
Remove the custom declarations of the external functions CreateDirect3D11DeviceFromDXGIDevice and CreateDirect3D11SurfaceFromDXGISurface, as well as the IDirect3DDxgiInterfaceAccess interface.
This commit is contained in:
parent
5f1d60b1a0
commit
130be55973
|
@ -22,6 +22,7 @@ target_precompile_headers(
|
|||
<obs-module.h>
|
||||
<util/windows/ComPtr.hpp>
|
||||
<Windows.Graphics.Capture.Interop.h>
|
||||
<windows.graphics.directx.direct3d11.interop.h>
|
||||
<winrt/Windows.Foundation.Metadata.h>
|
||||
<winrt/Windows.Graphics.Capture.h>
|
||||
<winrt/Windows.System.h>)
|
||||
|
|
|
@ -14,6 +14,7 @@ target_precompile_headers(
|
|||
<DispatcherQueue.h>
|
||||
<dwmapi.h>
|
||||
<Windows.Graphics.Capture.Interop.h>
|
||||
<windows.graphics.directx.direct3d11.interop.h>
|
||||
<winrt/Windows.Foundation.Metadata.h>
|
||||
<winrt/Windows.Graphics.Capture.h>
|
||||
<winrt/Windows.System.h>)
|
||||
|
|
|
@ -1,19 +1,5 @@
|
|||
#include "winrt-capture.h"
|
||||
|
||||
extern "C" {
|
||||
HRESULT __stdcall CreateDirect3D11DeviceFromDXGIDevice(
|
||||
::IDXGIDevice *dxgiDevice, ::IInspectable **graphicsDevice);
|
||||
|
||||
HRESULT __stdcall CreateDirect3D11SurfaceFromDXGISurface(
|
||||
::IDXGISurface *dgxiSurface, ::IInspectable **graphicsSurface);
|
||||
}
|
||||
|
||||
struct __declspec(uuid("A9B3D012-3DF2-4EE3-B8D1-8695F457D3C1"))
|
||||
IDirect3DDxgiInterfaceAccess : ::IUnknown {
|
||||
virtual HRESULT __stdcall GetInterface(GUID const &id,
|
||||
void **object) = 0;
|
||||
};
|
||||
|
||||
extern "C" EXPORT BOOL winrt_capture_supported()
|
||||
try {
|
||||
/* no contract for IGraphicsCaptureItemInterop, verify 10.0.18362.0 */
|
||||
|
@ -50,7 +36,8 @@ template<typename T>
|
|||
static winrt::com_ptr<T> GetDXGIInterfaceFromObject(
|
||||
winrt::Windows::Foundation::IInspectable const &object)
|
||||
{
|
||||
auto access = object.as<IDirect3DDxgiInterfaceAccess>();
|
||||
auto access = object.as<Windows::Graphics::DirectX::Direct3D11::
|
||||
IDirect3DDxgiInterfaceAccess>();
|
||||
winrt::com_ptr<T> result;
|
||||
winrt::check_hresult(
|
||||
access->GetInterface(winrt::guid_of<T>(), result.put_void()));
|
||||
|
|
Loading…
Reference in a new issue