Skip to content

Desktop duplication on hybrid systems #39

@follyfoxe

Description

@follyfoxe

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions