Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DX grabber: stick to user specified device selection #961

Merged
merged 2 commits into from
Oct 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions sources/grabber/windows/DX/DxGrabber.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,10 @@ bool DxGrabber::init()

if (!autoDiscovery && !_deviceProperties.contains(_deviceName))
{
Debug(_log, "Device %s is not available. Changing to auto.", QSTRING_CSTR(_deviceName));
autoDiscovery = true;
_retryTimer->setInterval(5000);
_retryTimer->start();
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);
return false;
}

if (autoDiscovery)
Expand All @@ -215,8 +217,7 @@ bool DxGrabber::init()
if (!_deviceProperties.isEmpty())
{
foundDevice = _deviceProperties.firstKey();
_deviceName = foundDevice;
Debug(_log, "Auto discovery set to %s", QSTRING_CSTR(_deviceName));
Debug(_log, "Auto discovery set to %s", QSTRING_CSTR(foundDevice));
}
}
else
Expand Down