When hooking DXGI-based graphics programs in the hook, the first hook point is IDXGISwapChain::Present. To be able to initiate a capture, a pointer to the device context that created the swap chain is required, which can be retrieved via IDXGISwapChain::GetDevice. Determining whether the device context was D3D10 or D3D11 has always been somewhat of an issue due to D3D10 and D3D11 being nearly identical, as well as their interoperability/interchangeability. The GetDevice function would first be called with the UUID of ID3D10Device, then if that failed, the UUID of ID3D11Device. However, with certain specific D3D11 games, GetDevice would for some unknown reason succeed with the UUID of ID3D10Device, which would cause capture to fail. (Conversely, attempting to call GetDevice with the UUID of ID3D11Device on a device that's actually ID3D10Device would always succeed, so reversing the order of the test was not an option). There were originally three known D3D11 games that would erroneously succeed when querying a D3D10 device interface: Call of Duty: Ghosts, Just Cause 3, and theHunter: Call of the Wild. All other known D3D11 games would work correctly. Because it was only these three games, a hack was originally implemented in the form of an executable exception list that would force them to capture D3D11. Unfortunately, Oculus games are now failing under the same circumstance as well, so a simple hack will no longer work. To fix this, a more reliable method of detecting which context it is had to be discovered: simply check the feature level using ID3D11Device::GetFeatureLevel. If the feature level is D3D_FEATURE_LEVEL_11_0 or D3D_FEATURE_LEVEL_11_1, the device is definitely a D3D11 device. Otherwise, continue the tests as they were before. Successfully tested with many D3D10 games, many D3D11 games, and especially those three D3D11 games that previously were detected as D3D10 erroneously.
OBS Studio <https://obsproject.com> =================================== What is OBS Studio? ------------------- OBS Studio is software designed for capturing, compositing, encoding, recording, and streaming video content, efficiently. It's distributed under the GNU General Public License v2 - see the accompanying COPYING file for more details. Quick Links ----------- - Website: https://obsproject.com - Help/Guides: https://github.com/jp9000/obs-studio/wiki - Forums: https://obsproject.com/forum/ - Build Instructions: https://github.com/jp9000/obs-studio/wiki/Install-Instructions - Bug Tracker: https://obsproject.com/mantis/ (Note: The bug tracker is linked to forum accounts. To use the bug tracker, log in to a forum account) Contributing ------------ - If you wish to contribute code to the project, please make sure read the coding and commit guidelines: https://github.com/jp9000/obs-studio/blob/master/CONTRIBUTING.rst - If you wish to contribute translations, do not submit pull requests. Instead, please use Crowdin. For more information read this thread: https://obsproject.com/forum/threads/how-to-contribute-translations-for-obs.16327/ - Other ways to contribute are by helping people out with support on our forums or in our community chat. Please limit support to topics you fully understand -- bad advice is worse than no advice. When it comes to something that you don't fully know or understand, please defer to the official help or official channels.
Description
Languages
C
56%
C++
36.8%
CMake
3%
Objective-C++
1.5%
Objective-C
1.3%
Other
1.4%