obs-studio/plugins/win-capture/graphics-hook
jp9000 104415d5c3 win-capture: Fix hook bug that could cause crashes
I had this issue where IDXGISwapChain::ResizeBuffers would fail in the
hooks, causing games to crash when they resized their backbuffers
because ResizeBuffers would return an 'invalid call' HRESULT value.  In
the ResizeBuffers documentation it says that it will only happen if a
backbuffer currently has any outstanding references, but there's no way
this would happen unless ResizeBuffers internally calls Present or vise
versa.

After ResizeBuffers has been called, the very first call to Present will
somehow seemingly invalidate and/or destroy the current backbuffer.
It's very strange, but that seems to be what's going on, at least for
the game I was testing.  So if you are performing a post-overlay
capture, then you must ignore the capture on the very first call to
Present.

It's Microsoft's code so you can't really know what's going on, you just
have to work around these strange issues seemingly in the dark.
2015-02-14 09:12:24 -08:00
..
CMakeLists.txt win-capture: Implement D3D8 game capture support 2015-02-09 05:02:48 -08:00
d3d1x_shaders.hpp win-capture: Add graphics-hook library 2014-12-09 14:21:07 -08:00
d3d8-capture.cpp win-capture: Implement D3D8 game capture support 2015-02-09 05:02:48 -08:00
d3d9-capture.cpp win-capture: Fix bug initializing via d3d9 swap 2015-02-09 03:49:47 -08:00
d3d9-patches.hpp Disable SEH for mingw-w64 2015-02-09 03:47:27 -08:00
d3d10-capture.cpp win-capture: deal with a 32bit handle cast errors 2015-02-09 03:41:54 -08:00
d3d11-capture.cpp win-capture: deal with a 32bit handle cast errors 2015-02-09 03:41:54 -08:00
dxgi-capture.cpp win-capture: Fix hook bug that could cause crashes 2015-02-14 09:12:24 -08:00
dxgi-helpers.hpp win-capture: Fix enum switch warnings 2015-02-09 03:49:46 -08:00
gl-capture.c win-capture: Fix debug function strings 2015-02-14 07:48:35 -08:00
gl-decs.h win-capture: Remove unused static variables 2015-02-09 03:50:50 -08:00
graphics-hook.c win-capture: Implement D3D8 game capture support 2015-02-09 05:02:48 -08:00
graphics-hook.h win-capture: Use inline define with VC only 2015-02-09 03:55:17 -08:00