hecomi / uDesktopDuplication

Desktop Duplication API implementation for Unity (only for Windows 8/10)
http://tips.hecomi.com/entry/2016/12/04/125641
MIT License
563 stars 97 forks source link

Message "Sorry this display is unsupported" appearing #30

Open paulIVRE opened 5 years ago

paulIVRE commented 5 years ago

On my laptop I get a big green message saying "Sorry this display is unsupported" when I try and use your plugin. I think the problem is that I have two adapters, one is used to display the desktop and another one for high apps that need high level performance. The app is run on the high performance GPU.

I could fix this my changing my app to run on the low performance adapter but I would prefer not to do this. Is it possible to make it so you can run the app on the high performance GPU while grabbing the screen from the desktop one? Thanks

hecomi commented 5 years ago

Sorry, uDD doesn't work with graphics hardwares which have on-chip/discrete GPUs like your laptop because the plugin uses Windows Desktop Duplication API (DDA) and this API doesn't allows it to run app on discrete GPU.

I heard from my some friends that there are some PCs which can disable the on-chip GPU completely and DDA works with the setting. But if not, we cannot run app with discrete GPU sadly.

I've also developed a window capture plugin, uWindowCapture (https://github.com/hecomi/uWindowCapture), and it also has a desktop-capture function. The capture itself is done asynchronously so the main thread doesn't get affected but its performance is slower than uDesktopDuplication, but you can run your app with high-performance GPU. Some people use this plugin as a fallback of uDesktopDuplication. Please think about using this depending on your use case.

DiscreteTom commented 1 year ago

How about capturing desktop using Desktop Duplication API in a standalone process, then use shared memory to load those data in the unity3d process?

DiscreteTom commented 1 year ago

How about capturing desktop using Desktop Duplication API in a standalone process, then use shared memory to load those data in the unity3d process?

I implemented this approach in a new lib: https://github.com/DiscreteTom/HyperDesktopDuplication