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:
parent
b5df4537a9
commit
d32424e5ad
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user