Conversation
Transparent windows using DirectComposition are recommended to not keep a redirection surface (`WS_EX_NOREDIRECTIONBITMAP`) to save memory. This has the consequence that the BitBlt method will not work correctly. In that case the automatic capture method selection now prefers the WGC method. Additionally, this also makes it so the automatic capture method selection is redone when the target window changes. References: https://learn.microsoft.com/en-us/archive/msdn-magazine/2014/june/windows-with-c-high-performance-window-layering-using-the-windows-composition-engine
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Description
Transparent windows using DirectComposition are recommended to not keep a redirection surface (
WS_EX_NOREDIRECTIONBITMAP) to save memory. This has the consequence that the BitBlt method will not work correctly. In that case the automatic capture method selection now prefers the WGC method.Motivation and Context
Capturing transparent windows that use DirectComposition without a redirection surface don't work without the user manually switching to the "Windows 10" capturing method. Soon LiveSplit will support proper transparency, so I would like it to easily be capturable. This does not yet address various related blending issues, but this is a good first step.
How Has This Been Tested?
I created a test build and captured my WIP LiveSplit build, which works now with the automatic selection, while the master version does not.
Types of changes
Checklist:
I used Codex to research the problem (as to what the original reason was why my window doesn't get auto detected, which led me to the no redirection surface) and help me with my build environment. The code and the PR are hand written of course. I've contributed to OBS before AI was a thing, so writing the code isn't an issue.