Secondary monitor only refreshing when I move or click the mouse using Windows Duplication API
I have written a screen sharing app in C++ with the windows duplication api. When I switch the screen of my app from primary to secondary, the primary monitor remains displayed until I interact with the secondary monitor (something changes). I have tried releasing all my variables when I stop my capturing thread and then restart it with the new screen. I have looked into swapchains as found here:
I am using Windows 10 and DirectX11.
Cannot reproduce with DXGIDesktopDuplication. Could you please show a minimal, reproducible sample and steps without private information in order to reproduce?
Attached is my windows duplication implementation of my screen capture interface.
How to use the attached code? Can you reproduce it using the DXGIDesktopDuplication sample?
Is there a way for me to switch between screens from the command line using the sample code?
Is there a way for me to switch between screens using the sample code?
A way to switch between screens is Drag and drop. As far as I'm concerned, it's by design that there is no update when the desktop image and the desktop pointer don't change. Have you checked IDXGIOutputDuplication::GetFrameMoveRects in your application?
Sign in to comment
Might be a basic step but have you tried to update the drivers and BIOS and see if that helps?
The below scenario might also be the reason.
While the operating system accumulates unprocessed desktop image updates, it might run out of space to accurately store the update regions. In this situation, the operating system starts to accumulate the updates by coalescing them with existing update regions to cover all new updates. As a result, the operating system covers pixels that it has not actually updated in that frame yet. But this situation doesn’t produce visual issues on your client app because you receive the entire desktop image and not just the updated pixels.
Hope this resolves your Query !!
--If the reply is helpful, please Upvote and Accept it as an answer--
You might be right after all. I tried running the app on a machine with a 5xx.xx driver and it worked fine.
Sign in to comment
0 additional answers
Sort by: Most helpful