Secondary monitor only refreshing when I move or click the mouse using Windows Duplication API

Elicia
21
Reputation points
Hi,
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:
https://stackoverflow.com/questions/10623787/directx-11-framebuffer-capture-c-no-win32-or-d3dx
I am using Windows 10 and DirectX11.
{count} votes
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
Hello there,
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