Skip to content
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
6 changes: 6 additions & 0 deletions src/hid.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ const RAZER_VENDOR_ID: u16 = 0x1532;
/// to a security key through Bridge.
const FIDO_USAGE_PAGE: u16 = 0xF1D0;
const RAZER_FEATURE_BUFFER_LEN: usize = 91;
const THERMALTAKE_VENDOR_ID: u16 = 0x264A;
/// The Iris's config collection holds only constant items, so Windows gives it
/// no caps and hidapi's rebuilt descriptor declares none of its 2052-byte
/// feature reports. Reads use this buffer (report id plus 2052 bytes) instead.
const THERMALTAKE_FEATURE_BUFFER_LEN: usize = 2053;
const RESUME_WATCH_STEP: Duration = Duration::from_secs(2);
/// A step that overshoots by this much means the machine was suspended.
const RESUME_GAP_THRESHOLD: Duration = Duration::from_secs(15);
Expand Down Expand Up @@ -1054,6 +1059,7 @@ impl HidSession {
Ok(length) => length,
Err(_) if open.vendor_id == RAZER_VENDOR_ID => RAZER_FEATURE_BUFFER_LEN,
Err(_) if open.vendor_id == MICROSOFT_VENDOR_ID => 64,
Err(_) if open.vendor_id == THERMALTAKE_VENDOR_ID => THERMALTAKE_FEATURE_BUFFER_LEN,
Err(_) => continue,
};
available = true;
Expand Down
Loading