wangcd
wangcd

Reputation: 21

cursor shape on capture screen using DXGI

I have written a screen capture program using windows screen capture API in DXGI。It works just OK。 But on some cases (such as when I drag a window to move it), the result contains a cursor shape on it.

like this]

This is not what I expected. Does ayone know how can I do to get rid of that.

Upvotes: 1

Views: 1035

Answers (1)

CptLoops
CptLoops

Reputation: 11

As far as i know there is no way to prevent this within DXGI. Your graphics adapter will decide wether to draw the cursor seperatly (you have to do the drawing yourself) or directly in to the screen image.

So basically your options are:

  • Write your own graphics adapter
  • Check if the cursor is invisible with FrameInfo->PointerPosition.Visible (that means the cursor is already drawn in the frame) and replace the cursor region with a previously saved frame -> overdraw it
  • Select a fully transparent cursor

Upvotes: 1

Related Questions