obs-studio/plugins/win-capture/graphics-hook
tujinshu 76e6a99124 win-capture: Fix rare crash when GL program exits
**Commit message modified and clarified by Jim**

When hooking a program that has both DirectX and OpenGL contexts in use,
it is possible to cause a crash on shutdown due to capture_active()
returning true when an OpenGL context is deleted.  Normally, when
capturing an OpenGL program, this would not happen because the 'active'
variable would not be set due to OpenGL capture not being initialized,
but if DirectX is captured while an OpenGL context is available, and
OpenGL could not load these required functions, then GL can crash due to
trying to use unavailable functions.

This case is extremely rare and doesn't happen under normal
circumstances; only if a program is using both DirectX and OpenGL within
the same program simultaneously, and *only* if OpenGL could not load the
required functions.  This likely almost never happens under normal
programs, games, and hardware.  This was apparently produced by hooking
a GL Qt program that used QWebEngine, which used multiple contexts at
once.
2019-11-05 13:44:15 -08:00
..
CMakeLists.txt cmake: Make static VC runtime libraries consistent 2018-09-12 07:49:13 -07:00
d3d1x_shaders.hpp clang-format: Apply formatting 2019-06-23 23:49:10 -07:00
d3d8-capture.cpp clang-format: Apply formatting 2019-06-23 23:49:10 -07:00
d3d9-capture.cpp win-capture: Remove support for feature level 9.3 2019-09-08 22:43:41 -07:00
d3d9-patches.hpp clang-format: Apply formatting 2019-06-23 23:49:10 -07:00
d3d10-capture.cpp clang-format: Apply formatting 2019-06-23 23:49:10 -07:00
d3d11-capture.cpp clang-format: Apply formatting 2019-06-23 23:49:10 -07:00
d3d12-capture.cpp win-capture: Remove unused variable from D3D12 capture 2019-09-08 22:36:25 -07:00
dxgi-capture.cpp clang-format: Apply formatting 2019-06-23 23:49:10 -07:00
dxgi-helpers.hpp clang-format: Apply formatting 2019-06-23 23:49:10 -07:00
gl-capture.c win-capture: Fix rare crash when GL program exits 2019-11-05 13:44:15 -08:00
gl-decs.h clang-format: Apply formatting 2019-06-23 23:49:10 -07:00
graphics-hook-config.h.in win-capture: Add D3D12 capture support 2016-11-03 12:13:42 -07:00
graphics-hook.c graphics-hook: Fix format specifier 2019-09-02 21:12:27 +08:00
graphics-hook.h clang-format: Apply formatting 2019-06-23 23:49:10 -07:00