v4l2: Corrected SDL_UDEV_AddCallback return check after #8694.

This commit is contained in:
Ryan C. Gordon
2023-12-17 15:45:13 -05:00
parent 0b5875825e
commit 2cdff93578

View File

@@ -869,7 +869,7 @@ static void V4L2_DetectDevices(void)
{ {
#ifdef SDL_USE_LIBUDEV #ifdef SDL_USE_LIBUDEV
if (SDL_UDEV_Init() == 0) { if (SDL_UDEV_Init() == 0) {
if (SDL_UDEV_AddCallback(CameraUdevCallback) >= 0) { // !!! FIXME: this should return 0 on success, it currently returns 1. if (SDL_UDEV_AddCallback(CameraUdevCallback) == 0) {
SDL_UDEV_Scan(); // Force a scan to build the initial device list SDL_UDEV_Scan(); // Force a scan to build the initial device list
} }
} }