libobs-d3d11: Include GDI surface in rebuild

The GDI surface was not included in the rebuild process, therefore when
window capture is used, it would cause a crash after a rebuild.
This commit is contained in:
jp9000 2016-11-06 16:46:38 -08:00
parent b77fdd7c9a
commit bd5de5d938

View File

@ -53,6 +53,13 @@ inline void gs_texture_2d::Rebuild(ID3D11Device *dev)
if (isRenderTarget)
InitRenderTargets();
if (isGDICompatible) {
hr = texture->QueryInterface(__uuidof(IDXGISurface1),
(void**)&gdiSurface);
if (FAILED(hr))
throw HRError("Failed to create GDI surface", hr);
}
}
inline void gs_zstencil_buffer::Rebuild(ID3D11Device *dev)