hecomi / uDesktopDuplication

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

Windows Application scaling #17

Open Karmoq opened 6 years ago

Karmoq commented 6 years ago

Hey hecomi, first of all, thank you for making such a powerful tool.

My issue is that I have a 4k screen and I am using the scaling in the display settings to scale up texts, apps etc. The problem now is if I use uDD that I get a grey texture instead. It has probably to do with the resolution because it says in the Unity editor that the monitor has only a resolution of 2560x1440 instead of the 3840x2160 when I use a scaling of 150% in the display settings of windows.

Many thanks again for this package and for making it open source

hecomi commented 6 years ago

Sorry for my late reply.... Thank you for using this asset and I'm very glad to hear that.

I also use two 4K screens and both are scaled to 150% (same as you). I've faced the same problem when I use uDD for the first time because Windows returns the wrong display size. When I use it for the second time, however, this bug doesn't occur. But If I change the name of the .exe or move it to the other directory, it occurs again. Is this the same case as yours? Or does this always occur in your environment?

lux commented 5 years ago

I believe I ran into the same thing my first run as well. The plugin showed grey and my desktop's display settings changed causing Unity's UI to go tiny. Here's my output log in case that helps:

uDesktopDuplication.log

Edit: It's worked perfectly on every subsequent launch. Not sure if this is related too, but another of our developers saw a repeated "d3d11: attempt to lock null buffer" message on first launch and everything froze.