소스 검색

Increased the timeout when opening /dev/hidraw nodes

We're still seeing it taking longer than 10ms for permissions to become available on Steam Deck.
Sam Lantinga 2 년 전
부모
커밋
2bf05f38ad
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/hidapi/linux/hid.c

+ 1 - 1
src/hidapi/linux/hid.c

@@ -1096,7 +1096,7 @@ hid_device * HID_API_EXPORT hid_open_path(const char *path)
 		return NULL;
 	}
 
-    const int MAX_ATTEMPTS = 10;
+    const int MAX_ATTEMPTS = 50;
     int attempt;
     for (attempt = 1; attempt <= MAX_ATTEMPTS; ++attempt) {
         dev->device_handle = open(path, O_RDWR | O_CLOEXEC);