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

Elicia 21 Reputation points
2023-03-10T16:18:44.7633333+00:00

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.

Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
10,990 questions
Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,485 questions
{count} votes

Accepted answer
  1. Limitless Technology 44,071 Reputation points
    2023-03-14T09:22:11.6666667+00:00

    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--


0 additional answers

Sort by: Most helpful