0
0
mirror of https://github.com/obsproject/obs-studio.git synced 2024-09-20 13:08:50 +02:00

win-capture: Reset d3d9 capture if device recreated

Fixes a bug where if a D3D9 program recreates its device the capture
would become invalid.  Certain games (especially blizzard games) will
completely recreate their Direct3D device if a critical D3D9 error
occurs.
This commit is contained in:
jp9000 2016-06-11 11:40:30 -07:00
parent b5df4537a9
commit d32424e5ad

View File

@ -603,6 +603,11 @@ static void d3d9_capture(IDirect3DDevice9 *device,
d3d9_init(device);
}
if (capture_ready()) {
if (data.device != device) {
d3d9_free();
return;
}
if (data.using_shtex)
d3d9_shtex_capture(backbuffer);
else