Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Desktop duplication on hybrid systems #39

Open
follyfoxe opened this issue Nov 1, 2024 · 1 comment
Open

Desktop duplication on hybrid systems #39

follyfoxe opened this issue Nov 1, 2024 · 1 comment

Comments

@follyfoxe
Copy link

Turns out DirectX's desktop duplication API has a limitation where it cannot run on a discrete GPU on hybrid systems. (For example, laptops with both integrated graphics and a dedicated gpu)
This is an issue when you're making a program in WPF or a game engine.

A workaround is to run the app in integrated graphics mode.

Figuring this out was quite painful. In my case, I had the preferred device set to the discrete gpu on my nvidia 3d graphics control panel. (So it forced the discrete gpu on everything)
I then switched it to automatic, and sure enough, screenCapture.RegisterCaptureZone didn't crash. (The second example in the readme was used)

During this whole thing I've also tried the Windows.Graphics.Capture API and it appears to work without issues; But is annoying to get working on something like WPF.

It would be nice if a remark was added to the readme or somewhere else so that other people in the future don't have to go through the same rabbit hole as I did.
DX9 worked fine when I tested it, It's the DX11 provider that is affected by this.

@DarthAffe
Copy link
Owner

Hey, that sounds like a really weird limitation, but it seems like there is not really much to get around it :(
I wasn't aware of that. Thanks for reporting, I've added a note to the readme.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants