Skip to content

Commit af160dc

Browse files
authored
DX grabber: stick to user specified device selection (#961)
* Dont auto-select DX device when is user configured * Enable auto-retry
1 parent a15126e commit af160dc

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

Diff for: sources/grabber/windows/DX/DxGrabber.cpp

+5-4
Original file line numberDiff line numberDiff line change
@@ -205,8 +205,10 @@ bool DxGrabber::init()
205205

206206
if (!autoDiscovery && !_deviceProperties.contains(_deviceName))
207207
{
208-
Debug(_log, "Device %s is not available. Changing to auto.", QSTRING_CSTR(_deviceName));
209-
autoDiscovery = true;
208+
_retryTimer->setInterval(5000);
209+
_retryTimer->start();
210+
Error(_log, "User selected '%s' device is currently not available and the 'auto' discovery is disabled. Retry in %.1f sec...", QSTRING_CSTR(_deviceName), _retryTimer->interval()/1000.0);
211+
return false;
210212
}
211213

212214
if (autoDiscovery)
@@ -215,8 +217,7 @@ bool DxGrabber::init()
215217
if (!_deviceProperties.isEmpty())
216218
{
217219
foundDevice = _deviceProperties.firstKey();
218-
_deviceName = foundDevice;
219-
Debug(_log, "Auto discovery set to %s", QSTRING_CSTR(_deviceName));
220+
Debug(_log, "Auto discovery set to %s", QSTRING_CSTR(foundDevice));
220221
}
221222
}
222223
else

0 commit comments

Comments
 (0)