From 538103c2c3a2777b94f6440f750e6b880c5f4eaf Mon Sep 17 00:00:00 2001 From: G2-Games Date: Sun, 18 Feb 2024 03:14:55 -0600 Subject: [PATCH] Fixed made native `get_device()` properly grab the first one --- .cargo/config.toml | 4 ++-- src/backend/native.rs | 3 ++- src/lib.rs | 6 +++--- src/usb.rs | 2 +- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.cargo/config.toml b/.cargo/config.toml index 4865338..68c7980 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -3,5 +3,5 @@ rustflags = ["--cfg=web_sys_unstable_apis"] [build] #just comment in the "current" target -#target = "x86_64-unknown-linux-gnu" -target = "wasm32-unknown-unknown" +target = "x86_64-unknown-linux-gnu" +#target = "wasm32-unknown-unknown" diff --git a/src/backend/native.rs b/src/backend/native.rs index 9d25274..af47659 100644 --- a/src/backend/native.rs +++ b/src/backend/native.rs @@ -70,7 +70,8 @@ pub async fn get_device(device_filter: Vec) -> Result Result; /// Reset the device, which causes it to no longer be usable. You must - /// request a new device with [crate::get_device] or [crate::get_device_filter] + /// request a new device with [crate::get_device] async fn reset(&self) -> Result<(), UsbError>; /// Remove the device from the paired devices list, causing it to no longer be usable. You must request to reconnect using [crate::get_device]