@@ -117,6 +117,31 @@ DDAGrabber::~DDAGrabber()
117117 }
118118}
119119
120+ void DDAGrabber::validateCursorSettings ()
121+ {
122+ // 1. Check for Mouse Trails (The most common culprit for "baked-in" cursors)
123+ int trailLines = 0 ;
124+ if (SystemParametersInfo (SPI_GETMOUSETRAILS , 0 , &trailLines, 0 ))
125+ {
126+ if (trailLines > 1 )
127+ {
128+ Warning (_log, " Incompatible Setting Detected: 'Display pointer trails' is ENABLED. "
129+ " A mouse cursor will appear in your screen capture. Disable this in Windows Mouse settings." );
130+ }
131+ }
132+
133+ // 2. Check for Cursor Shadow (Can also trigger software compositing on older drivers/hardware)
134+ BOOL shadowEnabled = FALSE ;
135+ if (SystemParametersInfo (SPI_GETCURSORSHADOW , 0 , &shadowEnabled, 0 ))
136+ {
137+ if (shadowEnabled)
138+ {
139+ Info (_log, " Note: 'Pointer shadow' is enabled. If a mouse cursor appears in capture, "
140+ " try disabling this setting in Windows." );
141+ }
142+ }
143+ }
144+
120145bool DDAGrabber::setupDisplay ()
121146{
122147 qCDebug (grabber_screen_flow) << " Setting up DDA grabber for display" << d->display ;
@@ -203,6 +228,8 @@ bool DDAGrabber::restartCapture()
203228 return false ;
204229 }
205230
231+ validateCursorSettings ();
232+
206233 qCDebug (grabber_screen_flow) << " Restarting capture for display" << d->display ;
207234
208235 if (d->dxgiAdapter == nullptr )
@@ -455,6 +482,12 @@ int DDAGrabber::grabFrame(Image<ColorRgb>& image, bool /*forceUpdate*/)
455482 if (SUCCEEDED (hr))
456483 {
457484 d->isFrameAcquired = true ;
485+ // If no pixels changed, skip immediately. This handles the "Only Mouse Moved" case
486+ if (frameInfo.AccumulatedFrames == 0 ) {
487+ SafeReleaseFrame (d->desktopDuplication );
488+ d->isFrameAcquired = false ;
489+ return -1 ;
490+ }
458491 }
459492
460493 // --- Error Handling ---
0 commit comments