DiscreteTom / rusty-duplication

Capture the screen on Windows using the Desktop Duplication API in Rust, with shared memory support.
MIT License
9 stars 1 forks source link

Bug with dual graphic card systems #11

Open tjma2001 opened 11 months ago

tjma2001 commented 11 months ago

I have an AMD radeon laptop which has both an integrated graphics processor on CPU as well as an Nvidia dedicated graphics card. I can't figure out any other way to instantiate your library without using Manager::new or Manager::default. Since I am unable to select the card/device I want the library to use it sometimes selects the Nvidia card because of some OS level settings. I then am confronted with the following error Error { message: "DuplicateOutput", windows: Some(Error { code: HRESULT(0x887A0004), message: "The specified device interface or feature level is not supported on this system." })

I can work around this by setting a specific setting that this application is run via the integrated card.

DiscreteTom commented 11 months ago

Hi @tjma2001 , thanks for the comments.

Yes the lib should run on the integrated graphics card on CPU.

You can use system setting or call some api to restrict your exe not to run on discrete GPUs. However I don't think that should be done by this lib, since it's an app-level setting and may be vary on different platforms.