win-capture: Fix D3D leaks on swap chain release

For game capture, hook DXGI release function to release D3D objects if
the related swap chain is also being destroyed.

An added bonus is that the game capture hook will handle swap chain
recreation for applications that don't use ResizeBuffers.
This commit is contained in:
jpark37
2020-09-09 22:35:11 -07:00
committed by Jim
parent 19cb3b9463
commit dad861b036
6 changed files with 47 additions and 4 deletions

View File

@@ -40,6 +40,8 @@ static inline bool load_offsets_from_string(struct graphics_offsets *offsets,
(uint32_t)config_get_uint(config, "dxgi", "present1");
offsets->dxgi.resize =
(uint32_t)config_get_uint(config, "dxgi", "resize");
offsets->dxgi2.release =
(uint32_t)config_get_uint(config, "dxgi", "release");
config_close(config);
return true;