mirror of
https://github.com/OpenActionAPI/rust-elgato-streamdeck.git
synced 2026-10-28 09:44:56 +00:00
Gate Mirabox devices behind parameter
This commit is contained in:
1 parent
4f83de3ab8
commit
996e57b7a3
2 files changed
+3
-3
No files matched your search
@@ -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
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user