Gate Mirabox devices behind parameter

This commit is contained in:
nekename committed 2025-04-16 19:02:19 +01:00
1 parent 4f83de3ab8
commit 996e57b7a3
2 files changed
+3 -3

No files matched your search

+1 -1
View File
@@ -63,7 +63,7 @@ if device.updated {
- [x] Reading buttons with async
## Supported Devices
As it stands, this library should support the following devices:
As it stands, this library should support the following devices. Please note that non-Elgato devices are only supported by consumers of this library that enable the support for them.
- Stream Deck Original
- Stream Deck Original V2
- Stream Deck XL
+2 -2
View File
@@ -57,11 +57,11 @@ pub fn refresh_device_list(hidapi: &mut HidApi) -> HidResult<()> {
/// Returns a list of devices as (Kind, Serial Number) that could be found using HidApi.
///
/// **WARNING:** To refresh the list, use [refresh_device_list]
pub fn list_devices(hidapi: &HidApi) -> Vec<(Kind, String)> {
pub fn list_devices(hidapi: &HidApi, only_elgato: bool) -> Vec<(Kind, String)> {
hidapi
.device_list()
.filter_map(|d| {
if !is_vendor_familiar(&d.vendor_id()) {
if d.vendor_id() != info::ELGATO_VENDOR_ID || !only_elgato && !is_vendor_familiar(&d.vendor_id()) {
return None;
}