v4l2: return success if the device is ready

This commit is contained in:
Green Sky
2024-09-17 13:20:42 +02:00
committed by Sam Lantinga
parent ab9c68d9ff
commit 11129761e7

View File

@@ -107,6 +107,8 @@ static bool V4L2_WaitDevice(SDL_Camera *device)
rc = select(fd + 1, &fds, NULL, NULL, &tv); rc = select(fd + 1, &fds, NULL, NULL, &tv);
if ((rc == -1) && (errno == EINTR)) { if ((rc == -1) && (errno == EINTR)) {
rc = 0; // pretend it was a timeout, keep looping. rc = 0; // pretend it was a timeout, keep looping.
} else if (rc > 0) {
return true;
} }
// Thread is requested to shut down // Thread is requested to shut down