From 6957a08d83d7c3a69493360c0eb8ecbad379e31d Mon Sep 17 00:00:00 2001 From: "Luke D. Jones" Date: Fri, 11 Aug 2023 09:48:22 +1200 Subject: [PATCH] Fix: Corrections in anime detection Closes #387 --- CHANGELOG.md | 1 + asusd/src/ctrl_anime/mod.rs | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b4430d2c..ef55cbfc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Fixes to asusctl CLI tool to show fan curves - Fixes to asusd to ensure fan curve defaults are loaded if the config file fails - Further refine the asusctl CLI for fan-curve control +- Fixes to AniMe detection ### Added - Support for GV601V LED modes diff --git a/asusd/src/ctrl_anime/mod.rs b/asusd/src/ctrl_anime/mod.rs index 24b72970..a8f6505d 100644 --- a/asusd/src/ctrl_anime/mod.rs +++ b/asusd/src/ctrl_anime/mod.rs @@ -24,7 +24,11 @@ impl GetSupported for CtrlAnime { type A = AnimeSupportedFunctions; fn get_supported() -> Self::A { - AnimeSupportedFunctions(HidRaw::new("193b").is_ok()) + if USBRaw::new(0x193b).is_ok() { + AnimeSupportedFunctions(true) + } else { + AnimeSupportedFunctions(HidRaw::new("193b").is_ok()) + } } } @@ -63,8 +67,8 @@ pub struct CtrlAnime { impl CtrlAnime { #[inline] pub fn new(config: AnimeConfig) -> Result { - let hid = HidRaw::new("193b").ok(); let usb = USBRaw::new(0x193b).ok(); + let hid = HidRaw::new("193b").ok(); let node = if usb.is_some() { unsafe { Node::Usb(usb.unwrap_unchecked()) } } else if hid.is_some() {