Fix: Corrections in anime detection

Closes #387
This commit is contained in:
Luke D. Jones
2023-08-11 09:48:22 +12:00
parent 98569b98e7
commit 6957a08d83
2 changed files with 7 additions and 2 deletions

View File

@@ -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

View File

@@ -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<CtrlAnime, RogError> {
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() {